DateTime not taking Daylight Savings into consideration
am 28.09.2007 20:34:13 von chaosblade
Hi, I've come across a small issue related to the DateTime class. It
seems to not take daylight savings here (Israel, GMT+2\+3 with DST)
into consideration, No matter the form used.
I've tried the default formats used by ToString, ToShortTimeString and
ToLongTimeString. All of them currently consider me to be in the GMT+3
timezone, Which is when DST is supposed to be turned on. Checking
IsDayLightSavingsTime() returns True currently, also incorrect.
I've also tried the provided MSDN example code for
DateTime.ToString(string), Which shows the same incorrect time.
Windows (Vista) itself correctly shows my time as GMT+2.
Is this a known issue? Is there a work-around it?
Any help appreciated.
Re: DateTime not taking Daylight Savings into consideration
am 02.10.2007 13:31:05 von cshNOSPAMPLEASE
chaosblade@gmail.com schreef:
> Hi, I've come across a small issue related to the DateTime class. It
> seems to not take daylight savings here (Israel, GMT+2\+3 with DST)
> into consideration, No matter the form used.
>
> I've tried the default formats used by ToString, ToShortTimeString and
> ToLongTimeString. All of them currently consider me to be in the GMT+3
> timezone, Which is when DST is supposed to be turned on. Checking
> IsDayLightSavingsTime() returns True currently, also incorrect.
>
> I've also tried the provided MSDN example code for
> DateTime.ToString(string), Which shows the same incorrect time.
>
> Windows (Vista) itself correctly shows my time as GMT+2.
>
> Is this a known issue? Is there a work-around it?
>
> Any help appreciated.
>
Check your CurrentCulture to see if your program is working in the right
culture. You might have to set it to your specific region.
--
Rinze van Huizen
C-Services Holland b.v