[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

Rohit will.u.tellmemore at gmail.com
Mon Jul 7 06:48:49 UTC 2008


On Jul 4, 1:48 am, David Woolley
<da... at ex.djwhome.demon.co.uk.invalid> wrote:
> Rohit wrote:
> > I am trying to get client machine's timezone from my java script . But
>
> This is off topic.
>
> Do you mean EcmaScript + old Netscape DOM, or do you mean Java.  I'm
> pretty certain that the former cannot provide the necessary information
> without calling out to native objects, and I'm not sure that latter can.
>
> > 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
>
> Whether you can even do this, and if so whether the result will be valid
> beyond the Autumn, depends on your operating system and country.
>

Will you elaborate bit more on this.

> > 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.
>
> I'm having difficulty thinking of a real world reason why you would want
> to do this.  All the uses I can think of involve shelling out.
>
> Note that this format is a legacy format, and the average Linux system
> (you posted from Linux) has a richer description of the rules.

Yeah but this is on embedded system which still uses that legacy
format.

Rohit




More information about the questions mailing list