US'adian DST, was Re: Confused on Syntax
- From: "Evertjan." <exjxw.hannivoort@xxxxxxxxxxxx>
- Date: 12 Mar 2007 20:25:40 GMT
Mythran wrote on 12 mrt 2007 in microsoft.public.scripting.jscript:
"Evertjan." <exjxw.hannivoort@xxxxxxxxxxxx> wrote in message
news:Xns98F1C7BD8DCB6eejj99@xxxxxxxxxxxxxxxxxx
Mythran wrote on 12 mrt 2007 in microsoft.public.scripting.jscript:
[...]Hope you have a great weekend!
Same to you.
Yeah, I live in US and use miles, but my statement above is just a
joke for those flamers out there that read this.
So you are aware of the miles of sillyness.
And how was your weekend?
OT: Pretty weird with the modified daylight savings time us US'adians
observe(ed).
Re-on-topiced:
I just posted this on microsoft.public.inetserver.asp.general,
stealing a jscript function for VBS use:
Since I need Central Europan Time, my servers are in Toronto,
and I cannot anymore follow Mr Bush'es influence on Canadian Time,
I made the following include .asp file,
valid for any server timezone location:
==================================
<%
nowGMT = DateAdd("h", TimezoneOffset, Now)
nowCET = DateAdd("h", 1, nowGMT)
If nowGMT>#2007-03-25 01:00# Then nowCET = DateAdd("h",2,nowGMT)
If nowGMT>#2007-10-28 01:00# Then nowCET = DateAdd("h",1,nowGMT)
If nowGMT>#2008-03-30 01:00# Then nowCET = DateAdd("h",2,nowGMT)
If nowGMT>#2008-10-26 01:00# Then nowCET = DateAdd("h",1,nowGMT)
%>
<script language='javascript' runat='server'>
var TimezoneOffset = new Date().getTimezoneOffset()/60;
</script>
===========================================
Why the one line if-then's and no elsif's?
Because I can more easily delete past year lines
and add new years say every two years.
Anyone with a simpler solution?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
.
- Follow-Ups:
- Re: US'adian DST, was Re: Confused on Syntax
- From: Dr J R Stockton
- Re: US'adian DST, was Re: Confused on Syntax
- From: Dr J R Stockton
- Re: US'adian DST, was Re: Confused on Syntax
- References:
- Re: Confused on Syntax
- From: Evertjan.
- Re: Confused on Syntax
- From: Evertjan.
- Re: Confused on Syntax
- From: Mythran
- Re: Confused on Syntax
- From: Evertjan.
- Re: Confused on Syntax
- From: Mythran
- Re: Confused on Syntax
- Prev by Date: Re: Confused on Syntax
- Next by Date: Re: US'adian DST, was Re: Confused on Syntax
- Previous by thread: Re: Confused on Syntax
- Next by thread: Re: US'adian DST, was Re: Confused on Syntax
- Index(es):