By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,384 Members | 1,829 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,384 IT Pros & Developers. It's quick & easy.

How to get when daylight saving starts and ends (date and time) fromjava script ?

P: n/a
I am trying to construct uclibc style timezone string(e.g. GMT
+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00) from javascript but do not
know how can i get when DST starts and ends from my script.I need to
know which day/week/month and time if not 2 a.m when DST setting start
taking effect and also stop taking effect.

Any suggestions ?

-- Rohit
Jul 2 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Jul 2, 6:36 pm, Rohit <will.u.tellmem...@gmail.comwrote:
I am trying to construct uclibc style timezone string(e.g. GMT
+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00) from javascript but do not
know how can i get when DST starts and ends from my script.I need to
know which day/week/month and time if not 2 a.m when DST setting start
taking effect and also stop taking effect.

Any suggestions ?

-- Rohit
I found this. Seems to be what i need but not sure about its
correctness. Will anybody confirm ??

http://groups.google.com/group/comp....7182e0187b0338
Jul 2 '08 #2

P: n/a
On Jul 2, 7:24 pm, Rohit <will.u.tellmem...@gmail.comwrote:
On Jul 2, 6:36 pm, Rohit <will.u.tellmem...@gmail.comwrote:
I am trying to construct uclibc style timezone string(e.g. GMT
+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00) from javascript but do not
know how can i get when DST starts and ends from my script.I need to
know which day/week/month and time if not 2 a.m when DST setting start
taking effect and also stop taking effect.
Any suggestions ?
-- Rohit

I found this. Seems to be what i need but not sure about its
correctness. Will anybody confirm ??

http://groups.google.com/group/comp....wse_frm/thread...
second last post from above link
Jul 2 '08 #3

P: n/a
On Jul 3, 12:24*am, Rohit <will.u.tellmem...@gmail.comwrote:
On Jul 2, 6:36 pm, Rohit <will.u.tellmem...@gmail.comwrote:
I am trying to construct uclibc style timezone string(e.g. GMT
+0IST-1,M3.5.0/01:00:00,M10.5.0/02:00:00) *from javascript but do not
know how can i get when DST starts and ends from my script.I need to
know which day/week/month and time if not 2 a.m when DST setting start
taking effect and also stop taking effect.
Any suggestions ?
-- Rohit

I found this. Seems to be what i need but not sure about its
correctness. Will anybody confirm ??

http://groups.google.com/group/comp....wse_frm/thread...
You might also try this thread:

<URL:
http://groups.google.com.au/group/co...d24f4dc9f96770
>

--
Rob
Jul 2 '08 #4

P: n/a
In comp.lang.javascript message <84d4c506-0b62-49fd-b721-f0847716d990@y2
1g2000hsf.googlegroups.com>, Sun, 6 Jul 2008 18:08:33, RobG
<rg***@iinet.net.auposted:
>
>Do you know anyone with a machine correctly set for Lord Howe Island?

No, but I can probably arrange it.

>Without that, <URL:http://www.merlyn.demon.co.uk/js-datec.htm#GUTZ>
cannot be completely tested.

Lord Howe Is is under the jurisdiction of New South Wales and seems to
follow the same dates for start and end - first Sunday in October and
April respectively. The Standard Time Act 1987 allows the NSW Govenor
to set the dates to whatever she wishes.
The Lord Howe Island change dates are typical. The special interest
lies in the amount of the clock change, 30 minutes, which means that the
second offset field cannot be blank (which means a change of one hour),
but must give the Summer offset as HH:MM.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 7 '08 #5

P: n/a
In comp.lang.javascript message <jh**************@invalid.uk.co.demon.me
rlyn.invalid>, Thu, 3 Jul 2008 18:56:24, Dr J R Stockton
<jr*@merlyn.demon.co.ukposted:
<URL:http://www.merlyn.demon.co.uk/js-datec.htm#GUTZ>
should now be correct for Morocco and Mauritius, where they apparently
need J-type Summer Time rules rather than M-type. I don't think a TZ
string can accommodate the rules which seem to apply in Israel and in
Iran. Of course, OS support is needed for the proper Rules, and may be
lacking.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 7 '08 #6

P: n/a
Dr J R Stockton wrote:
In comp.lang.javascript message <84d4c506-0b62-49fd-b721-f0847716d990@y2
1g2000hsf.googlegroups.com>, Sun, 6 Jul 2008 18:08:33, RobG
<rg***@iinet.net.auposted:
>>Do you know anyone with a machine correctly set for Lord Howe Island?
No, but I can probably arrange it.

>>Without that, <URL:http://www.merlyn.demon.co.uk/js-datec.htm#GUTZ>
cannot be completely tested.
I set my local machine to Lord Howe time, your page shows:

Your TZ is : std-10:30smr-11,M10.1.0/02:00,M4.1.0/02:00
--
Rob
Jul 9 '08 #7

P: n/a
In comp.lang.javascript message <48740fd3$0$7209$5a62ac22@per-
qv1-newsreader-01.iinet.net.au>, Wed, 9 Jul 2008 11:39:43, RobG
<rg***@iinet.net.auposted:
>Dr J R Stockton wrote:
>In comp.lang.javascript message <84d4c506-0b62-49fd-b721-f0847716d990@y2
1g2000hsf.googlegroups.com>, Sun, 6 Jul 2008 18:08:33, RobG
<rg***@iinet.net.auposted:
>>>Do you know anyone with a machine correctly set for Lord Howe Island?
No, but I can probably arrange it.
Without that, <URL:http://www.merlyn.demon.co.uk/js-datec.htm#GUTZ>
cannot be completely tested.

I set my local machine to Lord Howe time, your page shows:

Your TZ is : std-10:30smr-11,M10.1.0/02:00,M4.1.0/02:00
Winter time, 10:30 ahead of GMT; Summer, 11:00 ahead.
Start at 1st Sun of Oct at 02:00 clock, go ahead to 02:30.
Stop at 1st Sun of Apr at 02:00 clock, go back to 01:30.

All seems to be well. It agrees with all available information. That
section of js-datec.htm has now been put in js-date2.htm. All we need
now are tests in Morocco, Mauritius, Iran, Israel. Thanks.

--
(c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05.
Web <URL:http://www.merlyn.demon.co.uk/- w. FAQish topics, links, acronyms
PAS EXE etc : <URL:http://www.merlyn.demon.co.uk/programs/- see 00index.htm
Dates - miscdate.htm moredate.htm js-dates.htm pas-time.htm critdate.htm etc.
Jul 9 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.