GORM Automatic timestamping - dateCreated, lastUpdated

View: New views
2 Messages — Rating Filter:   Alert me  

GORM Automatic timestamping - dateCreated, lastUpdated

by tkarakai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Is there a way to set the timezone (I would like to have GMT) for the timestamps automatically generated by these properties? I have multiple servers in different timezones operating on the same database...

Re: GORM Automatic timestamping - dateCreated, lastUpdated

by tkarakai :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Two app servers using a shared db, updating two records at the same time but in different timezones will end up so many hours apart in the database... but I would like them to have the same timestamp...

Anybody sees a need for specifyable timezones in the autogenerated date fields? Do you all set all servers to the same timezone? (I guess GMT is the obvious choice)

tkarakai wrote:
Is there a way to set the timezone (I would like to have GMT) for the timestamps automatically generated by these properties? I have multiple servers in different timezones operating on the same database...