Re: Time Zone
Re: Time Zone
- Subject: Re: Time Zone
- From: Jay Prince <email@hidden>
- Date: Wed, 9 Oct 2002 00:06:57 -0700
I think the answer to your problem lies in NSCalendarDate. It has
functions that allow you to create a date with a timezone and in its
docs I found a function that gets the current system timezone -
[NSTimeZone systemTimeZone]... plus its really easy to get a new date
from an old date by adding hours.. For instance, using NSCalendarDate,
if the initial date is 11:59pm on December 31st, 1999, and you add 4000
seconds to the date, the resulting date will be in January of 2000.
Good luck.
Jay
On Tuesday, October 8, 2002, at 12:51 pm, FlyMac wrote:
Hello,
I tried to find an answer to my question in the web archives, but
didn't find any direct answer to my little problem.
Well, I need to create a NSDate object based on a string the user
types in, using
[NSDate dateWithString:[NSString stringWithFormat...
I have absolutely no problem working with it, but at the end, I must
specify the user's time zone in 1HHMM. That's where I'm stuck. How do
I get the timezone the user is in ?
As I need to do such a kind of timer, I'd need to know this in order
to not be "X" hours too late or to early in my computations.
If I enter +0200 for example it works great, but I think users in the
other time zones won't appreciate to be synchronized with my time zone
;-)
Thanks for any help,
Kevin
______________________________________________________________________
Etudiant: Wanadoo t'offre le Pack eXtense Haut Dibit soit 150,92 euros
d'iconomies ! Clique ici : http://www.ifrance.com/_reloc/mail.etudiant
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
References: | |
| >Time Zone (From: FlyMac <email@hidden>) |