Starboard Module Reference: time_zone.h

  • The system's time zone information is accessible, providing the number of minutes west of the Greenwich Prime Meridian without Daylight Savings Time adjustments.

  • SbTimeZone is a typedef for an integer representing the time zone offset in minutes.

  • SbTimeZoneGetCurrent function retrieves the current system time zone offset in minutes.

  • SbTimeZoneGetName function retrieves a string representation of the current time zone in IANA format, such as 'America/New_York'.

Provides access to the system time zone information.

Typedefs

SbTimeZone

The number of minutes west of the Greenwich Prime Meridian, NOT including Daylight Savings Time adjustments.

For example: America/Los_Angeles is 480 minutes (28800 seconds, 8 hours).

Definition

typedef int SbTimeZone

Functions

SbTimeZoneGetCurrent

Gets the system's current SbTimeZone in minutes.

Declaration

SbTimeZone SbTimeZoneGetCurrent()

SbTimeZoneGetName

Gets a string representation of the current timezone. The format should be in the IANA format https://data.iana.org/time-zones/theory.html#naming) . Names normally have the form AREA/LOCATION, where AREA is a continent or ocean, and LOCATION is a specific location within the area. Typical names are 'Africa/Cairo', 'America/New_York', and 'Pacific/Honolulu'.

Declaration

const char* SbTimeZoneGetName()