If I am reading the documentation correctly, the IsDaylightSavings() ALWAYS
returns false if the 'Kind' property of the DateTime is Utc. Thus I would
think that DateTime.UtcNow.IsDaylightSavings() always returns false,
whereas DateTime.Now.IsDaylightSavings() might return true if it truly is
Daylight Savings. The 'Kind' property is new to .NET 2.0, so if you are
using 1.1 you won't see it, but it still might be there. Try using
DateTime.Now instead.
Also, Are you actually setting the time on your computer, or just setting
the timezone? I would think that your computer time must be set to a
date/time during which it is ACTUALLY Daylight Savings. We are currently
on Standard Time (DST runs from early April to late October.)
-mdb
"Varangian" <of****@gmail.com> wrote in news:1137422513.885462.241620
@g47g2000cwa.googlegroups.com:
Hello there,
I'm having a problem with Utcnow property. I'm checking the Utcnow for
IsDayLightSaving() if true or false. I'm setting the timezone to GMT
time London etc and during summer when daylight saving is applied hence
GMT Daylight time.
However the System.DateTime.Utcnow.IsDayLightSaving() always returns
false even when it is on GMT Daylight time. Whats this.. what I'm
missing?
Thanks for any insights