Hello Bill;

It depends on your database as some products always think they are in GMT and others try and fiddle the inbound/outbound timestamps so it depends on your specific setup. I tend to do this in my app constructor to force the JVM itself into GMT...

        TimeZone tz = java.util.TimeZone.getTimeZone("GMT+0000");
        TimeZone.setDefault(tz);
        NSTimeZone.setDefault(tz);

...then I assume the timestamps in the DB are in GMT. I create formatters in the session object (accessed from the components) which have the 'data timezone' as GMT and the display timezone as "the user's timezone". These are used to render data and also to parse inbound values.

I can't vouch for the fact that I'm correct on this per se, but this approach seems to work very well for me and makes good sense to me personally. I think you will find timezone setters on NeXT's "NSTimestampFormatter" and you can find out more about the formatters I use in my LEWOStuff "overview PDF" which you can download from my website.

Good luck.

cheers.

If anyone can help nudge me just a little further along... (please)
I'm having a heck of a time understanding 'how' to programmatically, or via
EOModeler, alter the 'serverTimeZone' attribute.


___
Andrew Lindesay
www.lindesay.co.nz



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to archive@mail-archive.com

Reply via email to