[ntp:questions] How to get uclibc style timezone string (e.g GMT+0IST-1, M3.5.0/01:00:00, M10.5.0/02:00:00) from javascript

Martin Burnicki martin.burnicki at meinberg.de
Mon Jul 7 14:05:20 UTC 2008


Danny,

Danny Mayer wrote:
> Rohit wrote:
>> On Jul 5, 12:11 am, ma... at ntp.isc.org (Danny Mayer) wrote:
>>> Rohit wrote:
>>>> I am trying to get client machine's timezone from my java script . But
>>>> i have no idea how would i be able to get it in uclibc format. (e.g.
>>>> GMT+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00) . I saw couple of posting
>>>> on net which suggest getTimezoneoffset or may be calculation with
>>>> dates from script  gives correct  offset including day light saving
>>>> time but i am not sure how correct this is. Again even if its
>>>> correct , its not telling me when (exact date and time )day light
>>>> saving adjustment starts and ends which is last part of /etc/TZ
>>>> string, Is there  a way to get this from java script.
>>> This is not an appropriate question for this newsgroup. You should be
>>> posting this in a javascript newsgroup or mailing list. We don't discuss
>>> javascript and timezones are irrelevant here.
>>>
>>> Danny
>> 
>> Well agreed to some extent. But i was not getting good responses in
>> other groups and its involves time related discussion so i thought it
>> might be ok. Also its not just about javascript as it may sound on
>> surface but its mostly about timezone stuff though i would be doing
>> this from javascript. But again i agree with you this might not be
>> exactly the group for my question. As people have showed interest i
>> would like to carry this thread forward.
> 
> Please take this elsewhere. This is a pure Javascript question and has
> nothing to do with this newsgroup.
> 
> Danny

I strongly disagree. 

This topic is about the conversion of timezone rules, and even though this
has nothing directly to do with NTP, it is related since we always keep
telling people, "NTP does not care about time zones, your client OS has
to." If someone asks how to do this the best way, should we tell him to go
elsewhere and leave him alone? This NG is one of the few places where you
can find lots of people interested in time keeping, who have enough
background to comment on this topic.

The question is how timezone rules could be converted safely from one format
into another one, and whether do this in java script, or lisp, or whatever
doesn't matter at all.


Martin
-- 
Martin Burnicki

Meinberg Funkuhren
Bad Pyrmont
Germany




More information about the questions mailing list