Time zones represent the standard time policies for a geopolitical region. Time zones have identifiers like “America/Los_Angeles” and can also be identified by abbreviations, such as PST for Pacific Standard Time.
Time zones can also represent a temporal offset—either plus or minus—from Greenwich Mean Time (GMT). For example, the temporal offset of Pacific Standard Time is 8 hours behind Greenwich Mean Time (GMT-8).
You typically work with system time zones rather than creating time zones by identifier or by offset. The
systemTimeZone class property returns the time zone currently used by the system if known. This value is cached once the property is accessed and doesn't reflect any system time zone changes until you call the
resetSystemTimeZone method. The
localTimeZone class property returns an auto-updating proxy object that always returns the current time zone used by the system. You can also set the
defaultTimeZone class property to make your app run as if it were in a different time zone than the system.
See the code snippet below:
using SA.IOSNative.Foundation; ... var zone = ISN_NSTimeZone.LocalTimeZone; Debug.Log("zone.Name: " + zone.Name); Debug.Log("zone.Description: " + zone.Description); Debug.Log("zone.SecondsFromGMT: " + zone.SecondsFromGMT);