A representation of time zone information.
#include <prtime.h> typedef struct PRTimeParameters { PRInt32 tp_gmt_offset; PRInt32 tp_dst_offset; } PRTimeParameters;
Each geographic location has a standard time zone, and if Daylight Saving Time (DST) is practiced, a daylight time zone. The PRTimeParameters
structure represents the local time zone information in terms of the offset (in seconds) from GMT. The overall offset is broken into two components:
tp_gmt_offset
tp_dst_offset
For example, the US Pacific Time Zone has both a standard time zone (Pacific Standard Time, or PST) and a daylight time zone (Pacific Daylight Time, or PDT).
tp_gmt_offset
is -28800 seconds. tp_dst_offset
is 0, indicating that daylight saving time is not in effect.tp_gmt_offset
is -28800 seconds, and tp_dst_offset
is 3600 seconds.A second example is Japan, which is 9 hours ahead of GMT. Japan does not use daylight saving time, so the only time zone is Japan Standard Time (JST). In JST tp_gmt_offset
is 32400 seconds, and tp_dst_offset
is 0.