473,322 Members | 1,614 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,322 software developers and data experts.

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

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
7 2578
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Joe | last post by:
Hello, How can I get the 2 dates where Daylight saving time starts and ends programatically? Mine is a c# asp.net web application.... Thanks Joe
11
by: cwdjrxyz | last post by:
Several threads have discussed the accuracy of time calculated using script when Daylight Saving Time (DST) is considered. A page at http://webexhibits.org/daylightsaving/ gives much information on...
14
by: Amitabh Deepak | last post by:
Is there any way to check whether daylight saving is enabled on a linux machine?
1
by: Drew | last post by:
Is there a way to check if it is daylight savings or not via c#? I have heard you can use System.Globalization? Thanks - Drew
0
by: Marcus | last post by:
Hello, Is mktime() dependent on PHP or the server's OS? I just read that starting next year, the time switches for daylight saving time will be "on the second Sunday of March and end the first...
2
by: maflatoun | last post by:
Hi guys, I have to make a event signup page for our company that would display the event time/date in 3 different time zones (Eastern - New York, Central - Chicago, and Pacific - San Francisco)....
1
by: mazdotnet | last post by:
Hi guys, I have to make a event signup page for our company that would display the event time/date in 3 different time zones (Eastern - New York, Central - Chicago, and Pacific - San Francisco)....
3
by: bill | last post by:
I found out that I can only set an offset in my session timezone in my ISP's MySQL server, not a timezone. So I am left with the task of setting the offset, which will vary, depending on whether...
27
by: RobG | last post by:
I was investigating a function to determine whether daylight saving was being observed on a particular date (given the platform's regional settings) and came across a suggestion at merlyn.com to...
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...
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)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.