I have been trying to find ways to save Datetime specific to “Arabian Standard Time” which is +4 UTC.
So far I have not been successful.
Here’s an example:
Response.Write("<br>System Time : " + DateTime.Now);
timeZoneInfo = TimeZoneInfo.FindSystemTimeZoneById("Arabian Standard Time");
dateTime = TimeZoneInfo.ConvertTime(DateTime.Now, timeZoneInfo);
Response.Write("<br>Arabian Standard Time : " + dateTime);
It always gives me the same datetime zone which I set on the desktop.
Can I set the time zone in web.config so that I will have datetime specific to a country on the application level?
I managed to get it right after using following code..
Now even if i change my desktop timezone it will always give me the time zone of “Arabian Standard Time”