Time zones are very hard to work with due to daylight saving. Aside from
the complex rules required for DST, countries change the rules from year
to year. DST was shifted for the Sydney Olympics, for example. You can't
really store the time as it will keep changing. You can store the
offset. You can get time zone info from the Windows Time Zone Editor
(http://www.softshape.com/cham/manual/tzedit.htm). There are some
functions at cflib that help too, such as GetLastOccOfDayInMonth() and
GetNthOccOfDayInMonth(). It's all rather difficult. If you can not worry
about the couple hours discrepancy from dst things are much simpler. You
just add or subtract the offset. 

Regards,
Matthew Walker
/*
        Cabbage Tree Creative Ltd
        Christchurch - New Zealand

        http://www.matthewwalker.net.nz/
        http://www.cabbagetree.co.nz/
*/



TimeZone = StructNew();
TimeZone.UTCOffset = 12;
TimeZone.UTCSummerOffset
TimeZone.SummerStarts = CreateDateTime(2002,10,6,2,0,0); Sunday October
6, 2002 at 2:00:00 AM --->
<!--- Daylight Saving Time DST ended on Sunday March 17, 2002 at 3:00:00
AM local daylight time 
DST starts on  local standard time 
  It declared that Daylight Time would commence at 2.00am Standard Time
on the first Sunday in October each year and would cease at 2.00am
Standard Time on the third Sunday in March of the following year.
 --->

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, 7 May 2002 5:54 p.m.
To: CF-Talk
Subject: Adjusting Time for Local Timezone?



--part1_9f.26d60b87.2a08c5e0_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Is it possible to get the local date and time (for the client) and store
it 
is a session variable? The server is in a different time zone.

Appreciate it if someone could help me out.

Marc

--part1_9f.26d60b87.2a08c5e0_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

<HTML><FONT FACE=arial,helvetica><FONT  SIZE=2 FAMILY="SANSSERIF"
FACE="Arial" LANG="0">Is it possible to get the local date and time (for
the client) and store it is a session variable? The server is in a
different time zone.<BR>
<BR>
Appreciate it if someone could help me out.<BR>
<BR>
Marc</FONT></HTML>

--part1_9f.26d60b87.2a08c5e0_boundary--
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

______________________________________________________________________
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to