Hello Leif;

1. Do I need to worry about setting the timezone in the EOModel for all my NSTimestamp attributes? Or is calling NSTimeZone.setDefaultTimeZone(NSTimeZone.getGMT()) in my Application constructor good enough?

I'm not sure what that value is used for in the EOModel -- anybody know?

I do this in the Application constructor...

        TimeZone tz = getTimeZone();

        if(null!=tz)
        {
                TimeZone.setDefault(tz);
                NSTimeZone.setDefault(tz);

                if(getBootLogger().isLoggable(java.util.logging.Level.INFO))
getBootLogger().info("application timezone set to '"+tz.getDisplayName()+"'");
        }

I avoid use of NSTimeZone and NSTimestampFormatter in general though.

2. Do I need to worry about configuring Postgres to set it's default timezone?

There is some coverage of this here;

        http://www.postgresql.org/docs/8.3/interactive/datatype-datetime.html

However I have used PG extensively with WO and just using the "TIMESTAMP" type which seems to result in no zone-adjusting.

3. How can I get the local timezone (of the browser client) so that I can use it for my WOTextfield formatters (to display local time)?

Either guess this from information on the inbound domain / the browser's headers or configure a time-zone in the database's records for the authenticated user.

4. Anything else I need to worry about, or not thinking of?

Check out the following for some ideas even though you are probably not using LEWOStuff;

        
http://homepage.mac.com/andrewlindesay/le/manuals/lewostuff/LEWOStuffOverview.pdf
        (6.22 "TimeZone, Date and...")

Hope this helps.

cheers.

___
Andrew Lindesay
www.lindesay.co.nz

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

This email sent to [email protected]

Reply via email to