473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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

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 from 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.

-- Rohit
Jul 2 '08 #1
4 3086
On Jul 2, 10:48*am, Rohit <will.u.tellmem...@gmail.comwrote:
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 from 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.
You mean JavaScript; or you mean Java and are in the wrong place.
And I guess you mean BST not IST. That is not a timezone; a timezone
reflects only Standard (Winter) Time, and does not change with the
seasons. The timezone corresponds to the first number in the string.

My Web page <URL:http://www.merlyn.demon.co.uk/js-date5.htmdoes
rather the opposite. And <URL:http://www.merlyn.demon.co.uk/js-
date2.htm>
shows how to determine the transitions for a given year. That, done
for
a few years, should enable the numerical part of the string to be
determined

The acronyms cannot in general be obtained. In any case, they are not
well-defined.

--
(c) John Stockton, near London, UK. Posting with Google.
Mail: J.R.""""""""@physics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demon.co.uk/>
FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...

Jul 2 '08 #2
On Jul 2, 6:14 pm, Dr J R Stockton <J.R.Stock...@physics.orgwrote:
On Jul 2, 10:48 am, Rohit <will.u.tellmem...@gmail.comwrote:
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 from 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.

You mean JavaScript; or you mean Java and are in the wrong place.
And I guess you mean BST not IST. That is not a timezone; a timezone
reflects only Standard (Winter) Time, and does not change with the
seasons. The timezone corresponds to the first number in the string.

My Web page <URL:http://www.merlyn.demon.co.uk/js-date5.htmdoes
rather the opposite. And <URL:http://www.merlyn.demon.co.uk/js-
date2.htm>
shows how to determine the transitions for a given year. That, done
for
a few years, should enable the numerical part of the string to be
determined

The acronyms cannot in general be obtained. In any case, they are not
well-defined.

--
(c) John Stockton, near London, UK. Posting with Google.
Mail: J.R.""""""""@physics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demon.co.uk/>
FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...
No no acronym are not real concern. I just put on string for example.
By timezone here what i really mean is string which indicates
following things.
(TZ env variable in embedded systems if you happen to know)

Need to know offset from GMT : e.g. GMT+5:30
Start of Daylight saving time : M3.5.0/01:00:00 : meaning at 1 on 0
th day(sunday), Week 5
Month: March
End of Daylight saving time : M10.5.0/02:00:00 : meaning at 2 on
0th day(sunday), Week 5
Month: October

--Rohit
Jul 2 '08 #3
On Jul 3, 7:12*am, Rohit <will.u.tellmem...@gmail.comwrote:
I have also started separate thread for this question.
Discussion fragmentation is deeply annoying, and leads to a loss of
interest in helping you.

Don't refer to articles by display position; that dependa in the
reading agent and its settings. Give thread subject, date, author,
message-ID.

Be aware that excessively long Subjects are a PITA.

Read, understand, and follow the newsgroup FAQ and the other links
provided.

--
(c) John Stockton, near London, UK. Posting with Google.
Mail: J.R.""""""""@physics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demon.co.uk/>
FAQish topics, acronyms, links, etc.; Date, Delphi, JavaScript, ...
Jul 3 '08 #4
On Jul 3, 2:31 pm, Dr J R Stockton <J.R.Stock...@physics.orgwrote:
On Jul 3, 7:12 am, Rohit <will.u.tellmem...@gmail.comwrote:
I have also started separate thread for this question.

Discussion fragmentation is deeply annoying, and leads to a loss of
interest in helping you.
Yes but if you can divide the problem in multiple components and each
can be individually answered, i do not see any problem in this. If
they are related provide the link . (Thats how things anyway get
related).
Don't refer to articles by display position; that dependa in the
reading agent and its settings. Give thread subject, date, author,
message-ID.

Be aware that excessively long Subjects are a PITA.
Agreed but its not just you and me out there. There are people who
kind of expect enough description in subject so they can decide
whether to click there or not. Please do not impose your style upon
others.
>
Read, understand, and follow the newsgroup FAQ and the other links
provided.
I have done this but there are quite few good ways to do same thing
and not one always. We do not need to agree on each aspect of this
thing unless things go really bad. Having said that i still see your
point of short subject as valid but i do not understand why should
that make someone who is there to answer questions NOT respond to the
actual question.

Thanks,
Rohit

Jul 3 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jack | last post by:
Hello, What function can get a string's long by JavaScript? Thank you
4
by: Sunny | last post by:
Hi, I am at present working on a jsp page which has a single text field. Upon entering a value in the field, i am trigerring an onChangeEvent() which calls a method of javascript. I am also...
2
by: GreggTB | last post by:
Hello, I'm trying to perform a very simple validation of user input. I want to verify that the user entered a six-digit string consisting entirely of numbers. So anything from 000000 to 999999 is...
2
by: zbiszko | last post by:
Is possiple to apply xsl style on string? I have for example string (i get it from some function).: "bla bla bla <gd> bla2 bla2</gd> <br/> dsdsd<aa>dsds sd</aa> sds " i would add header and main...
7
by: Julia | last post by:
Hi I am trying to pass an encoded string to a JavaScript the following is the C# code which convert the string STRING_TO_ENCODE to base64 byte bytIn =...
2
by: Henri | last post by:
Hi! consider this : <div runat="server" id="mydiv" style="color:white;width:200px;" /> the styles contained in the style attributes are automatically parsed to the Style property. Is there a...
2
by: PJ6 | last post by:
I can probably code this up manually myself but I'd prefer to use a built-in method that I'm sure exists... I have a message box client-side control (thanks, Steve Orr) that uses the JavaScript...
3
by: rameshkumarc | last post by:
how to Pass a String array in a javascript from jsp
2
kaleeswaran
by: kaleeswaran | last post by:
hi! i am comparing two dates.so i am getting one date is from my data base.and i send it that value using request parameter.so i am converted date to string .now i want to convert that string...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.