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/