Click here to Skip to main content
16,022,362 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
hey guyz i have used timezoneinfo class to return the timezoneinfo of current system here is my code
string t = TimeZoneInfo.Local.Id;
string displayname = TimeZoneInfo.Local.DisplayName;

it displays me correct at the first time but when i change my timezone from clock it still shows me old timezone can any body plz help me out?
Posted
Updated 23-May-11 20:06pm
v3

1 solution

it displays me correct at the first time but when i change my timezone from clock it still shows me old timezone
If your webserver is differnet from the machine you are browsing then this will happen. You will get server time as the code is running on the server. Changing timezone on client system will not affect it.
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 24-May-11 2:14am    
It would be so funny if OP really expected that the timezone on client machine would make the difference (not really sure, it would be too much). 5 for the answer anyway.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900