TimeZone Not Found Exception
I want to convert Indian DateTime object to Eastern DateTime object. Means I want to change time zone of particular DateTime object. For this I have written following code:
         string easternZoneId = "Eastern Standard Time";
         TimeZoneInfo easternZone = TimeZoneInfo.FindSystemTimeZoneById(easternZoneId);
 
         string indianZoneId = "India Standard Time";
         TimeZoneInfo indianZone = TimeZoneInfo.FindSystemTimeZoneById (indianZoneId);
 
         DateTime d = TimeZoneInfo.ConvertTime (DateTime.Today, indianZone, easternZone);
 
               When I try to run this statement I am getting, following exception in Console.

How to run this code? I want to convert my time into eastern time.
Answer by Azaberym · Apr 27, 2018 at 08:25 AM
Here for a late answer: Try to set your Api Compatibility Level to .NET 4.6 in the player settings, that did it for me.
Answer by nicolaspozzi · Mar 29, 2019 at 08:36 PM
The solution above doesn't work for me. Instead, i just use another method, DateTime.UtcNow Example : log.Date = DateTime.UtcNow;
It works for me, it give the exact date that i need
Answer by nadalizadeh · Aug 24, 2019 at 08:50 AM
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
 
              Your answer