Reply to Re: Working with Timezones and DST

Your name:

Reply:


Posted by Daz on 05/27/07 20:23

On May 27, 8:13 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Daz wrote:
> > On May 27, 3:31 pm, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> >> Daz wrote:
> >>> Hello everyone.
> >>> I am creating a JavaScript project which will allow users to see what
> >>> time it is in other countries. I am wondering if there's any way to
> >>> have the server work this out, without having to update a database
> >>> constantly with the times and dates that certain countries set their
> >>> clocks back or forward.
> >>> Can this be done, or do I need to connect to a time server? Ideally, I
> >>> need a time server that will return a JavaScript object containing the
> >>> information I need, but I don't think one exists.
> >>> Please could someone suggest the steps I need to take to quickly
> >>> obtain the correct time for any given country, which will take DST
> >>> into account? Sadly, to my knowledge, the UK is the only country that
> >>> has hard-coded rules for when the clocks are changed, where as it
> >>> seems to be a political thing for all other countries.
> >>> If I have to run a database with this information, then so be it, but
> >>> it seems like a lot of manual work, and I'm not sure how often I'd
> >>> need to update it.
> >>> Many thanks in advance.
> >>> Daz.
> >> And what are you going to do with the United States, which has six time
> >> zones (and some not everyone observes DST). Or Russia, which has eight
> >> time zones?
>
> >> In the U.S., everyone who participates does so on the same day. But not
> >> everyone has to participate.
>
> >> --
> >> ==================
> >> Remove the "x" from my email address
> >> Jerry Stuckle
> >> JDS Computer Training Corp.
> >> jstuck...@attglobal.net
> >> ==================
>
> > Absolutely nothing! Hehe. Unless of course you have a suggestion. I
> > cannot do the impossible. I am quite sure that this problem can be
> > overcome, however. I was under the impression that the PHP timezones
> > would take care of it. Would it not?
>
> The time zone will be the time zone for your server. There is no way
> for you to tell what the timezone on my machine is.
>
> Your best bet is to just ask them what timezone they are in, and whether
> or not to adjust for dst.

Or I can use JavaScripts Date() object... It's not 100% accurate, but
neither is asking them.

> As for the dates of when to start/stop. I don't have any good
> recommendations there. I suspect the timezones would set it
> appropriately - but there are way too many to be usable, IMHO.

Thanks for your comments. I think I will use JavaScript to make an
educated guess, and give them the option to change it if it's
incorrect.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация