title: How to get TimeZoneInfo on Android, using Unity 2020.3.0f1?
body: <p>Since the Google Play Leaderboard Servie is in the Pacific Standard Time Zone, I want get the local time there to update a calendar, which unlocks daily levels. Once the player actually launches a level I fetch the time from a server. However at application launch I already wanted to set the time for the calendar. However I just can't seem to get any TimeZoneInfo.</p>
  <pre><code>        public static DateTime GetDatePacificStandardTime(this DateTime value)
      {
  #if UNITY_ANDROID &amp;&amp; !UNITY_EDITOR
  
          try
          {
              AndroidJavaClass Java = new AndroidJavaClass(&quot;com.unity3d.player.UnityPlayer&quot;);
  
              AndroidJavaObject AndroidActivity = Java.GetStatic&lt;AndroidJavaObject&gt;(&quot;currentActivity&quot;);
              TimeZone timeZone = AndroidActivity.Call&lt;TimeZone&gt;(&quot;getTimeZone&quot;, &quot;America/Los_Angeles&quot;);
  
              TimeSpan difference = timeZone.GetUtcOffset(value);
  
              return value.Add(difference);
          }
          catch(Exception exception)
          {
              Debug.Log(&quot;AndroidActivity.Call failed: &quot; + exception);
          }
  
          try
          {
              return TimeZoneInfo.ConvertTimeFromUtc(value, TimeZoneInfo.FindSystemTimeZoneById(&quot;Pacific Standard Time&quot;));
          }
          catch (Exception exception)
          {
              Debug.Log(&quot;TimeZoneInfo.FindSystemTimeZoneById Pacific Standard Time failed: &quot; + exception);
          }
  
          try
          {
              return TimeZoneInfo.ConvertTimeFromUtc(value, TimeZoneInfo.FindSystemTimeZoneById(&quot;Central Pacific Standard Time&quot;));
          }
          catch (Exception exception)
          {
              Debug.Log(&quot;TimeZoneInfo.FindSystemTimeZoneById Central Pacific Standard Time failed: &quot; + exception);
          }
  
          try
          {
              return TimeZoneInfo.ConvertTimeFromUtc(value, TimeZoneInfo.FindSystemTimeZoneById(&quot;PST&quot;));
          }
          catch (Exception exception)
          {
              Debug.Log(&quot;TimeZoneInfo.FindSystemTimeZoneById PST failed: &quot; + exception);
          }
  
          try
          {
              return TimeZoneInfo.ConvertTimeFromUtc(value, TZConvert.GetTimeZoneInfo(&quot;PST&quot;));
          }
          catch (Exception exception)
          {
              Debug.Log(&quot;TZConvert.GetTimeZoneInfo PST failed: &quot; + exception);
          }
  
          try
          {
              return TimeZoneInfo.ConvertTimeFromUtc(value, TZConvert.GetTimeZoneInfo(&quot;Pacific Standard Time&quot;));
          }
          catch (Exception exception)
          {
              Debug.Log(&quot;TZConvert.GetTimeZoneInfo Pacific Standard Time failed: &quot; + exception);
          }
  
          try
          {
              return TimeZoneInfo.ConvertTimeFromUtc(value, TZConvert.GetTimeZoneInfo(&quot;Central Pacific Standard Time&quot;));
          }
          catch (Exception exception)
          {
              Debug.Log(&quot;TZConvert.GetTimeZoneInfo Central Pacific Standard Time failed: &quot; + exception);
          }
  
          return value;
  #endif
          return TimeZoneInfo.ConvertTimeFromUtc(value, TimeZoneInfo.FindSystemTimeZoneById(&quot;Pacific Standard Time&quot;));
  
      }
  </code></pre>
  <ol>
  <li>LogCat gives me
  <ul>
  <li>03-27 18:44:58.362: I/Unity(25251): AndroidActivity.Call failed: System.Exception: JNI: Unknown signature for type 'System.TimeZone' (obj = System.TimeZone) equal</li>
  <li>03-27 18:44:58.362: I/Unity(25251): AndroidActivity.Call failed: System.Exception: JNI: Unknown signature for type 'System.TimeZone' (obj = System.TimeZone) equal</li>
  <li>03-27 18:44:58.365: I/Unity(25251): TimeZoneInfo.FindSystemTimeZoneById Pacific Standard Time failed: System.TimeZoneNotFoundException: Couldn't read time zone file /usr/share/zoneinfo/Pacific Standard Time ---&gt; System.IO.DirectoryNotFoundException: Could not find a part of the path &quot;/usr/share/zoneinfo/Pacific Standard Time&quot;.</li>
  <li>03-27 18:44:58.367: I/Unity(25251): TimeZoneInfo.FindSystemTimeZoneById Central Pacific Standard Time failed: System.TimeZoneNotFoundException: Couldn't read time zone file /usr/share/zoneinfo/Central Pacific Standard Time ---&gt; System.IO.DirectoryNotFoundException: Could not find a part of the path &quot;/usr/share/zoneinfo/Central Pacific Standard Time&quot;.</li>
  <li>03-27 18:44:58.370: I/Unity(25251): TimeZoneInfo.FindSystemTimeZoneById PST failed: System.TimeZoneNotFoundException: Couldn't read time zone file /usr/share/zoneinfo/PST ---&gt; System.IO.DirectoryNotFoundException: Could not find a part of the path &quot;/usr/share/zoneinfo/PST&quot;.</li>
  <li>03-27 18:44:58.371: I/Unity(25251): TZConvert.GetTimeZoneInfo PST failed: System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.</li>
  <li>03-27 18:44:58.372: I/Unity(25251): TZConvert.GetTimeZoneInfo Pacific Standard Time failed: System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.</li>
  <li>03-27 18:44:58.373: I/Unity(25251): TZConvert.GetTimeZoneInfo Central Pacific Standard Time failed: System.TimeZoneNotFoundException: Exception of type 'System.TimeZoneNotFoundException' was thrown.</li>
  </ul>
  </li>
  </ol>