DateTime not taking Daylight Savings into consideration

C

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.
 
C

C-Services Holland b.v.

(e-mail address removed) 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top