Last post Jan 22, 2016 06:31 AM by TechView
Jan 22, 2016 05:00 AM|ramiwahdan|LINK
how to use the timezone to display in general. what i mean, i need it to work based on user location and not specific location. If user in US it will display his time, If in China it will display his time and so on...
below is specific for china:
var date = DateTime.UtcNow;
TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById("China Standard Time");
Console.WriteLine(TimeZoneInfo.ConvertTimeFromUtc(date,tzi));// display the time in china
so can i do that for all based on location?
Jan 22, 2016 05:27 AM|anuj_koundal|LINK
Here is what your are looking for:
Jan 22, 2016 06:10 AM|Nan Yu|LINK
Please refer to below links for the javacript solution:
Jan 22, 2016 06:31 AM|TechView|LINK
You have to do it keeping TimeZone offset in database. Here is a link that works well. Have a look:
Take sometime to read and done. Good luck.