help with time zone issues

G

Guest

Hi,
I need to do some timezone conversions and am not sure how to do what I want
to do with the 1.1 framework (which is what we are using here). My issue is
this: I have information that I need to submit to a company that is in a
part of the US that does not observe daylight savings. So, for part of the
year they are on the same timezone as I am and for part of the year they are
an hour behind. I know that I can store all of my information in UTC, but am
not sure how to convert it out to a specific time because the offset I would
have to use is different at different times of the year. Is there a way that
I can find out if I am currently on daylight savings time? This would tell
me to add 1 from the offset that I use for the rest of the year. Have looked
everywhere for an answer to this one and can't find it. Can anyone suggest
something for me?

Thanks in advance,

Linda
 
C

Chris Dunaway

lf said:
I need to do some timezone conversions and am not sure how to do what I want
to do with the 1.1 framework (which is what we are using here). My issue is
this: I have information that I need to submit to a company that is in a
part of the US that does not observe daylight savings. So, for part of the
year they are on the same timezone as I am and for part of the year they are
an hour behind. I know that I can store all of my information in UTC, but am
not sure how to convert it out to a specific time because the offset I would
have to use is different at different times of the year. Is there a way that
I can find out if I am currently on daylight savings time? This would tell
me to add 1 from the offset that I use for the rest of the year. Have looked
everywhere for an answer to this one and can't find it. Can anyone suggest
something for me?

You don't need to worry about adding anything. Just use
DateTime.ToUniversalTime and DateTime.ToLocalTime. They should
automatically take Daylight Savings into account.
 

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