thanks, but that didn't work either. In the end i changed the func.<db
call> to a datetime.datetime.now() python call which seems to work. I
also noticed that i had to change all my date inserts to datetime
objects as well (previously i was using postgres and inserted dates as
date strings i.e. '2007-01-01' which seemed to work ok).
I'm new to SA so perhaps i should have been doing that all along
anyway.
Cheers
Nick

On 5 Jul, 15:29, Michael Bayer <[EMAIL PROTECTED]> wrote:
> On Jul 5, 2007, at 6:00 AM, Nick wrote:
>
> > class TestC(Entity):
> >     with_fields(
> >         name    = Field(Unicode(50), nullable=False),
> >         created = Field(TIMESTAMP(timezone=True),
> > default=func.datetime('now', 'localtime'))
> >     )
>
> set up the func as
>
> func.datetime('now', 'localtime', type=TIMESTAMP)


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to