• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Localizing time
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Localizing time


  • Subject: Re: Localizing time
  • From: James Cicenia <email@hidden>
  • Date: Wed, 19 Oct 2005 16:21:54 -0500

Thanks Ken that really helps a lot.

A couple of questions. I am storing the relevant dates as timestamps in mysql. I thought that NSTimestamp automatically saves the date as GMT so I don't quite understand the EOModeler connection. Finally where do you put serverTimeZone=GMT? As an attribute to some preference table/object, or in the user's profile?

Thanks again,
James


On Oct 19, 2005, at 4:09 PM, Ken Anderson wrote:

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
  • Follow-Ups:
    • Re: Localizing time
      • From: LD <email@hidden>
References: 
 >Localizing time (From: James Cicenia <email@hidden>)
 >Re: Localizing time (From: Ken Anderson <email@hidden>)

  • Prev by Date: Re: NSDictionary and FetchSpecificationNamed usage
  • Next by Date: Web Based EOModeler?
  • Previous by thread: Re: Localizing time
  • Next by thread: Re: Localizing time
  • Index(es):
    • Date
    • Thread