I think the isDSTon value will tell you if it is currently DST .

If isDSTon EQ 'yes'
        Time = time + 18
else
        Time = time + 17
End

That way you don't need to know when DST happens, the operating system will
take care of it.

Brian

-----Original Message-----
From: Mike Kear [mailto:[EMAIL PROTECTED] 
Sent: Thursday, 2 December 2004 1:42 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: Converting to local time

Brian,  thanks for this suggestion. Good one. 

When i look at the server I'm on i see the following; 
isDSTon NO  
utcHourOffset 6  
utcMinuteOffset 0  
utcTotalOffset 21600  

compared to my own pc here in my office: 
isDSTon YES  
utcHourOffset -11  
utcMinuteOffset 0  
utcTotalOffset -39600  

So that just says all you have to do if you're in the same time zone
as I am (Sydney)  is have an offset of 17hours (6 + 11) in our summer
time, and 18 hours (6 + 12) in our standard time.

Which is what you, Tom, said at the beginning of this thread.

So all you have to do to make it automatic is determine which is the
day daylightsavings turns on/off and set the offset variable to 17 or
18 hours depending on the result.  (which again is what you said at
the outset, Tom).

I'll assume you're right that time changes in NSW on the last Sunday
in October and the first Sunday in March. (I'm not questioning you, I
dont know.  I just go by the radio  and tv - when they tell us to
change, that's when i do it)

Here's the pseudo code for how i'd work out if 'today' is in summer
time or not:

Find the first sunday in march.
   Is today after that date?  => Summer time
Find the last Sunday in October
   is today before that date?  => Summertime
Other wise it's Standard time.


To find the first Sunday in March I'd do this (pseudo code again)

Loop from 1-7  item=i
   dayofweek[i] is 1 (sunday)?   =>  No, keep looping
                                             yes, thats the date. 

To find the last Sunday in October I'd do this: 

Loop from 24-31  item=i
   dayofweek[i] is 1 (Sunday)?   =>  No, keep looping
                                             yes, thats the date. 


Cheers
Mike Kear
Windsor, NSW, Australia
AFP Webworks
http://afpwebworks.com
.com,.net,.org domains from AUD$20/Year




On Thu, 2 Dec 2004 09:17:51 +1000, KNOTT, Brian
<[EMAIL PROTECTED]> wrote:
> Tom,
>        Use GetTimeZoneInfo.  It's a structure and one of the things it
> returns is if the machine has daylight saving on.
> 
> GetTimeZoneInfo.isDSTOn
> 
> 
> 
> Brian Knott
>

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


-----------------------------------------------------------------------------------
This e-mail is sent by Suncorp-Metway Limited ABN 66 010 831 722 or one of its 
related entities ("Suncorp"). 

Suncorp may be contacted at Level 18, 36 Wickham Terrace, Brisbane or on 13 11 
55  or at suncorp.com.au.

The content of this e-mail is the view of the sender or stated author and does 
not necessarily reflect the view of Suncorp. The content, including 
attachments, is a confidential communication between Suncorp and the intended 
recipient. If you are not the intended recipient, any use, interference with, 
disclosure or copying of this e-mail, including attachments, is unauthorised 
and expressly prohibited. If you have received this e-mail in error please 
contact the sender immediately and delete the e-mail and any attachments from 
your system.

If this e-mail constitutes a commercial message of a type that you no longer 
wish to receive please reply to this e-mail by typing Unsubscribe in the 
subject line.


---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to