You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by "Sica, David (David)" <ds...@avaya.com> on 2004/04/06 19:27:58 UTC

Time Zone with Torque and PostgreSQL

I have an application that could be running on servers in different time
zones.  I'm storing several columns of data in PostgreSQL using the
timestamp datatype.  I now realize that I need to record the time zone
as part of the timestamp as this application could be inserting into the
database from different time zones.  I'm trying to determine the best
way to handle this situation.  Here's some thoughts:

1) I could use the PostgreSQL datatype "timestamp with time zone" though
I'm wondering if/how Torque will handle this datatype?

2) I could always store the timestamp in UTC by calling new
Calendar().getTimeInMillis() and setting this value in my Torque data
object.

Are there any comments or suggestions for implementation?

Thanks,
David Sica