sandya_116
asked on
convert datetime from one timezone to another timezone
I have a datetime for example 09-25-2011 01:00am CET. How do I convert this time to another timezone for example EST or GMT. Thanks.
ASKER
I am looking for asp.net code to do this.
ASKER
The format on the start date time is flexible. But, it has a time and timezone for the start date. I need to convert this to the server's time zone datetime or another time zone.
Now i see what you mean. I guess it will be clearer if you had included that in your question.
Have a look at this blog posts:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=593
and
http://r4r.co.in/asp.net/01/tutorial/asp.net/Convert%20Time%20in%20Different%20TimeZones%20in%20ASP.NET%20using%20C-sharp.shtml
Have a look at this blog posts:
http://www.dotnetcurry.com/ShowArticle.aspx?ID=593
and
http://r4r.co.in/asp.net/01/tutorial/asp.net/Convert%20Time%20in%20Different%20TimeZones%20in%20ASP.NET%20using%20C-sharp.shtml
For a step by step explanation of the steps read Scott's article
http://www.4guysfromrolla.com/articles/081507-1.aspx#postadlink
http://www.4guysfromrolla.com/articles/081507-1.aspx#postadlink
ASKER
the zone asp.net is specified in the questions so I think everyone understands it. oh well, I already looked at these articles and didn't help me. The problem I have is I get this datetime with a timezone so that cannot be changed. I need to convert this to server timezone.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks rajapandian_81. That is working but just a quick question can it consider daylight saving time as well?
It should consider daylight saving time.
To know the properties and methods:
http://msdn.microsoft.com/en-us/library/bb396389.aspx
To know the properties and methods:
http://msdn.microsoft.com/en-us/library/bb396389.aspx
This should put you on the right direction. For basic programming purpose you might want to use the GMT as a reference point for other time conversions. GL