• 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: NSTimestampFormatter DECREMENTING 'day' on each pass
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTimestampFormatter DECREMENTING 'day' on each pass


  • Subject: Re: NSTimestampFormatter DECREMENTING 'day' on each pass
  • From: email@hidden
  • Date: Wed, 17 May 2006 10:47:30 +1200

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      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: WebAssistant not working any longer
  • Next by Date: Re: NSTimestampFormatter DECREMENTING 'day' on each pass
  • Previous by thread: Re: NSTimestampFormatter DECREMENTING 'day' on each pass
  • Next by thread: XMLserializing with NSData, need Help !
  • Index(es):
    • Date
    • Thread