-
Notifications
You must be signed in to change notification settings - Fork 1
Time Zone
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.iOS.Foundation;
...
var zone = ISN_NSTimeZone.LocalTimeZone;
Debug.Log("zone.Name: " + zone.Name);
Debug.Log("zone.Description: " + zone.Description);
Debug.Log("zone.SecondsFromGMT: " + zone.SecondsFromGMT);
Reliable and high-quality Unity Development service. Let's Talk!
Website | AssetStore | LinkedIn | Youtube | Scripting Reference
- Getting Started
- Authentication
- Game Center UI
- Leaderboards
- Default Leaderboard
- Achievements
- Saving A Game
- Access Point
- iTunes Connect Setup
- StoreKit Initialization
- Purchase flow
- Receipt Validation
- Store Review Controller
- Storefront API
- Subscription Offers