some problem on TimeZoneInfo.Local

When i used TimeZoneInfo.Local by Unity3D 4.5,i get a TimeZoneNotFoundException:‘System.TimeZoneNotFoundException’。
Does It mean Unity3D do not support TimeZone?
or i make a mistake
please help me
cheer up

Update your player settings to use .net 4.6

the TimeZoneInfo class is broke on unity 5.1 .

Put your .NET version to 4.6 in player settings, the followings are the output in my tests:

TimeZoneInfo.Local.Id
Editor: Local
iOS Device: Local

TimeZoneInfo.Local.DisplayName
Editor: Local
iOS Device: (GMT+03:30) Local Time

TimeZoneInfo.Local.StandardName
Editor: +0330
iOS Device: +0330

TimeZoneInfo.Local.DaylightName
Editor: +0430
iOS Device: +0430

TimeZoneInfo.Local.BaseUtcOffset.Hours + ":" + TimeZoneInfo.Local.BaseUtcOffset.Minutes);
Editor: 3:30
iOS Device: 3:30

,Put your .NET version to 4.6 in player settings, the followings are the output in my tests:

TimeZoneInfo.Local.Id
Editor: Local
iOS Device: Local

TimeZoneInfo.Local.DisplayName
Editor: Local
iOS Device: (GMT+03:30) Local Time

TimeZoneInfo.Local.StandardName
Editor: +0330
iOS Device: +0330

TimeZoneInfo.Local.DaylightName
Editor: +0430
iOS Device: +0430

TimeZoneInfo.Local.BaseUtcOffset.Hours + ":" + TimeZoneInfo.Local.BaseUtcOffset.Minutes);
Editor: 3:30
iOS Device: 3:30

TimeSpan currentOffset = localZone.GetUtcOffset( System.DateTime.Now);

Debug.LogError(“UTC offset:” + currentOffset);

print:

UTC offset: 08:00:00

Hi!

Does anyone know if this bug is fixed with the last Unity 5.2.2f1? @Lancemaker_ ?

I’m experiencing the same issue on Unity 5.1 project while trying to get Unity communicate with the Microsoft Exchange Web Service API, as it relies heavily on TimezoneInfo.

For some operations I can bypass the problem by setting Timezone to TimeZoneInfo.UTC, (basically for setting up the service, so I already can send an email through Unity). But for others (gathering calendar events for example) I can’t find a way to avoid relying on TimeZoneInfo.Local.

Using 2017.1.1f1, and using .net 3.5 still throws this error. This is more than three years later. Come on Unity, not everyone can use 4.6,

Put your .NET version to 4.6 in player settings, the followings are the output in my tests:

TimeZoneInfo.Local.Id
Editor: Local
iOS Device: Local

TimeZoneInfo.Local.DisplayName
Editor: Local
iOS Device: (GMT+03:30) Local Time

TimeZoneInfo.Local.StandardName
Editor: +0330
iOS Device: +0330

TimeZoneInfo.Local.DaylightName
Editor: +0430
iOS Device: +0430

TimeZoneInfo.Local.BaseUtcOffset.Hours + ":" + TimeZoneInfo.Local.BaseUtcOffset.Minutes);
Editor: 3:30
iOS Device: 3:30