Re: easy one: current date in Paris
Re: easy one: current date in Paris
- Subject: Re: easy one: current date in Paris
- From: has <email@hidden>
- Date: Tue, 5 Jul 2005 23:53:32 +0100
Daniel Jalkut wrote:
>>Perhaps a dayligght saving time issue?
Yep; the OP's code only calculates Central European Time, which is UTC + 1, whereas France is currently on Central European Daylight Time, which is UTC + 2. Just as well he didn't test this code in winter, otherwise he'd not have discovered the bug till several months later! ;)
(Y'know, there should be an internet law against folks putting casual comments like "easy one" in a subject line; it will always end in tears.:p)
>Check this page:
>http://www.timeanddate.com/worldclock/city.html?n=195
>Shows that Paris is currently in DST, which means it's 2 hours ahead.
>I can't see an obvious way to predict when future DSTs will be occuring, but I bet there's a formula out there somewhere.
Calculating DST can be a bit of a pig as the rules vary around the world. In most of Europe DST runs from the last Sunday in March to the last Sunday in October; this probably includes France but you should confirm it for yourself. Also, I'm not sure exactly upon which hours the clocks change; I think in the UK they go forward at 1am and back at 2am, but other European countries may put it back at 3am; again, you'd need to check for France.
BTW, if you've access to Cocoa, I think NSTimeZone may have sufficient smarts to calculate when DST is active based on a specific country so check it out as well; nothing beats having someone else do all the hard work for you. ;)
HTH
has
--
http://freespace.virgin.net/hamish.sanderson/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden