Hello I have an exception when local time changes to UTC. I run my application on Windows where "Russian Standard Time" is set.
Public Convert () {DateTime dt = DateTime.Now; Date time DT1 = DateTime.Now; // This converstian time zone works. ConvertTimeOutC (DT, timezonefox local); // Now get ID timezoneinfo tz = Get local time zone, go from time to time. Finance System System ZonbiIID ("Russian Standard Time"); If (time zone infoco.local.id == tz.Id) {// it is only to ensure that we have the same time zone) / // this conversion does not work // throws exception system. Tool Exception TimesZoneInfo Convert timeto UTC (DT1, TJ); } UPDATE
The exception is saying text - can not complete the prose because the property like datetime is inaccurate. For example, if the merciful is local, the timezone Time zone should be priced at the price.
Sorry this is not a copy-paste - the original message is not in English.
TimezoneInfo The aquellus method does not compare to the ID only: it also checks that there are only one adjustment rule in the two time zones ( timezonefoHessam rules ) - you can see it using the reflector Are there.
I suspect that the local timezone is actually using daylight saving time, while TimeZoneInfo.FindSystemTimeZoneById ("Russian standard time") a time zone without daylight saving time Is back
You should be able to use the debugger easily.
Comments
Post a Comment