Thanks Mike, you're right it's python-sybase. I'll report the bug. On Oct 13, 2:18 pm, Michael Bayer <mike...@zzzcomputing.com> wrote: > On Oct 13, 2011, at 4:30 PM, jn wrote: > > > Using: > > SQLAlchemy-0.7.2 > > python_sybase-0.40pre1 > > Sybase ASE 12.5.3 > > > I have column: > > edate = Column(DateTime, nullable=False, quote=False) > > > This is info printed using the fetched row: > > type: <type 'DateTimeType'> > > edate: Jan 28 2009 12:00AM > > edate year: 2009 > > edate month: 0 > > > Why is the month zero-based? (I can't tell where the origin of this > > is, since mxDateTime & sybase are 1-based) > > It's not SQLAlchemy - we take what python-sybase gives us and send it > straight on. It should be sending back a Python datetime object which does > not accept "0" for a month, not sure how you're getting a zero or what type > of object you're getting. > > The sybase DBAPIs are *extemely* buggy and have a very low userbase - this is > largely the product of Sybase itself. Expect to hit a lot of gotchas. > > For this issue I'd create a python-sybase only (no SQLAlchemy) test case, > confirm you get the same broken date back under the same conditions, and > report a bug to the python-sybase authors. Or otherwise illustrate a > properly working python-sybase script and exactly what SQLAlchemy usage is > not returning that result - the above snippet is not specific enough for me > to take any action upon.
-- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.