cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gary Jarrel" <garyjar...@gmail.com>
Subject Cayenne and GMT Date and Time
Date Thu, 13 Sep 2007 05:09:58 GMT
Hi All!

I'm working on a Cayenne app, and am looking for a way to store all
dates in the database in GMT irrespective of which locate the
application/server is running in?

I noticed that even when I would use the code like:

TimeZone tzGmt = getGmtTimeZone();
Calendar cal = new GregorianCalendar();
cal.get(Calendar.HOUR); //this line might not be important at all
cal.setTimeZone(TimeZone.getTimeZone("GMT");

Then use the date object of cal.getTime() it still stores the date in
the locate which the server running the application is configured for!

Has anyone done anything similar?

Thank you!

Gary

Mime
View raw message