473,811 Members | 3,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 getTimezoneoffs et 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 3105
On Jul 2, 10:48*am, Rohit <will.u.tellmem ...@gmail.comwr ote:
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 getTimezoneoffs et 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.demo n.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.""""""""@ph ysics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demo n.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...@p hysics.orgwrote :
On Jul 2, 10:48 am, Rohit <will.u.tellmem ...@gmail.comwr ote:
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 getTimezoneoffs et 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.demo n.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.""""""""@ph ysics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demo n.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.comwr ote:
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.""""""""@ph ysics.org or (better) via Home Page at
Web: <URL:http://www.merlyn.demo n.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...@p hysics.orgwrote :
On Jul 3, 7:12 am, Rohit <will.u.tellmem ...@gmail.comwr ote:
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
2030
by: Jack | last post by:
Hello, What function can get a string's long by JavaScript? Thank you
4
13394
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 dynamically creating an array in the jsp page and want to pass this array (by reference) to the javascript function. All I want to do in the javascript function is to check whether the input value matches with any of the array elements. However, i have...
2
2630
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 considered valid. The problem that I'm having is getting the validation to work on the entire string. In other words, 000000 is okay but 000000000000 is also returning as a match. Here's a quick code block...I have something along these lines.......
2
1242
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 element, after that i would like to use function string-join and get such string: <?xml version="1.0" encoding="UTF-8"?> <doc> bla bla bla <gd> bla2 bla2</gd> <br> dsdsd<aa>dsds sd</aa> sds
7
6802
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 = System.Text.UnicodeEncoding.Unicode.GetBytes(STRING_TO_ENCODE); string result=System.Convert.ToBase64String
2
1404
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 built-in method to import another string to the Style property. Some kind of:
2
1728
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 alert() method to pass text to a user in a dialogue box. Often I have messages containing text that JavaScript doesn't like, like single quote characters. Does ASP.NET have a method to parse text for JavaScript? Server.HTMLEncode doesn't seem to do...
3
2807
by: rameshkumarc | last post by:
how to Pass a String array in a javascript from jsp
2
3790
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 in javascript. give me your advice.... thank you..
0
9726
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9204
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7667
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6887
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5553
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4338
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3865
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3017
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.