DST/Summertime across the Atlantic

E

Evertjan.

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?
 
E

Evertjan.

Dave Anderson wrote on 12 mrt 2007 in
microsoft.public.inetserver.asp.general:
Always use GMT?

Would be nice. Why dosn't VBS have GMT knowledge?

However:

1 others make use of those servers too.

2 UTC/GMT is not practical for my users.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,116
Messages
2,570,700
Members
47,277
Latest member
GYZMilton9

Latest Threads

Top