On Nov 25, 2010, at 8:40 PM, Domingo Aguilera wrote: > Somewhat related to this Michael, > > is there a way to express a server_default meaning "native engine's > timestamp" for DateTime columns? A value that would mean getutcdate() > in sql server, current_timestamp in postgresql and so on?
usually server_default=func.now() accomplishes this - that will use localtime. For utc we don't have a backend-agnostic UTC function as of yet, you can create them pretty easily with @compiles. > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > 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. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. 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.
