Re: Localizing time
Re: Localizing time
- Subject: Re: Localizing time
- From: Ken Anderson <email@hidden>
- Date: Wed, 19 Oct 2005 17:09:22 -0400
James,
A little more info would help. Are you trying to get the users to
see localized time on their browser window? How do you have dates
stored right now?
What I typically do is store all dates as GMT and note them in the
model as such (EOModeler is unhappy about timezone support so I
usually end up putting serverTimeZone=GMT; into the model file).
Then I take a look at the headers when the client logs in and grab
the x-clientTimeZoneOffset key, using that to setup a timezone offset
that gets stored in the session.
Then I have a formatter in the session that's configured for the
timezone I got out of the headers. Whenever I need to display a date/
time, I put:
session.localTimestampFormatter
as the formatter. It grabs the formatter from the session and
viola! all your timestamps are localized to where the user is.
Ken
On Oct 19, 2005, at 4:13 PM, James Cicenia wrote:
Hello -
Any thoughts, bits of code, etc., about converting an app to
localize time? Will I need to change the currently stored data?
Finally, what about the dreaded daylight savings time?
Too bad I can't override my EO's current methods. Hmm, so
effectively I have to write new methods in the wocomponents that
use the dates?
Thanks in advance for any thoughts,
James Cicenia
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40anderhome.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden