Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

something wrong with my UTCOFFSET

Status
Not open for further replies.

masterDicanio

Programmer
May 14, 2005
18
IR
Hi

i want to get utc time , then i use :
Dim myzone as timezone = timezone.currenttimezone
response.write(myzone.ToUniversalTime(now))

but it shows 1 hour lower than exact UTC time , i checked my windows time zone and found it correct [GMT + 3 : 30]

then i checked this :
response.write(myzone.GetUtcOffset(now))
and it is wrong = 04 : 30

i dont know , what is wrong , any experience ?
 
Why not use DateTime.UtcNow ?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
chiph i used it , it is wrong too ! the universal time for me is GMT + 4 : 30 in asp but in my computer timezone , it is GMT + 3 : 30 ! then one hour is missed !
 
What do System.TimeZone.CurrentTimeZone.StandardName and System.TimeZone.CurrentTimeZone.DaylightName say?

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top