26#ifndef _ULTIBO_TIMEZONE_H
27#define _ULTIBO_TIMEZONE_H
38#define TIME_ZONE_ID_UNKNOWN 0
39#define TIME_ZONE_ID_STANDARD 1
40#define TIME_ZONE_ID_DAYLIGHT 2
41#define TIME_ZONE_ID_INVALID (DWORD)0xFFFFFFFF
44#define TIMEZONE_SIGNATURE 0xED9A1BC3
47#define TIMEZONE_NAME_LENGTH SIZE_64
48#define TIMEZONE_DESC_LENGTH SIZE_128
#define STDCALL
Definition globaltypes.h:45
_Bool BOOL
Built in Boolean type (1 byte) (Redeclared here for flexibility).
Definition globaltypes.h:55
wchar_t WCHAR
Standard WideChar type (2 bytes) (Redeclared here for flexibility).
Definition globaltypes.h:58
int32_t daylightbias
Definition timezone.h:76
int32_t bias
Definition timezone.h:71
char standardname[33]
Definition timezone.h:72
char name[33]
Definition timezone.h:69
SYSTEMTIME standardstart
Definition timezone.h:74
char description[65]
Definition timezone.h:70
SYSTEMTIME daylightstart
Definition timezone.h:77
int32_t standardbias
Definition timezone.h:73
char daylightname[33]
Definition timezone.h:75
char daylightname[TIMEZONE_NAME_LENGTH]
Daylight name.
Definition timezone.h:96
TIMEZONE_ENTRY * next
Next entry in Timezone table.
Definition timezone.h:101
int32_t daylightbias
Definition timezone.h:97
char description[TIMEZONE_DESC_LENGTH]
Timezone description.
Definition timezone.h:91
int32_t bias
Definition timezone.h:92
SYSTEMTIME standardstart
Definition timezone.h:95
char standardname[TIMEZONE_NAME_LENGTH]
Standard name.
Definition timezone.h:93
uint32_t signature
Signature for entry validation.
Definition timezone.h:89
SYSTEMTIME daylightstart
Definition timezone.h:98
TIMEZONE_ENTRY * prev
Previous entry in Timezone table.
Definition timezone.h:100
int32_t standardbias
Definition timezone.h:94
char name[TIMEZONE_NAME_LENGTH]
Timezone name.
Definition timezone.h:90
struct _SYSTEMTIME SYSTEMTIME
struct _TIME_ZONE_INFORMATION TIME_ZONE_INFORMATION
Definition timezone.h:53
int32_t STDCALL timezone_get_daylight_bias(TIMEZONE_ENTRY *timezone)
TIMEZONE_ENTRY *STDCALL timezone_get_default(void)
Get the current default timezone.
uint32_t STDCALL timezone_get_state(TIMEZONE_ENTRY *timezone)
Get the state of the supplied Timezone at the current date and time.
uint32_t STDCALL timezone_add(TIMEZONE_DATA *data, BOOL _default)
Add a Timezone from a timezone data block and to the Timezone table.
uint32_t STDCALL timezone_calculate_offset(double_t datetime, int32_t *offset, BOOL *daylight)
Calculate the Timezone Offset at the given date and time in the current timezone.
uint32_t STDCALL timezone_enumerate(timezone_enumerate_cb callback, void *data)
uint32_t STDCALL timezone_update_offset(void)
uint32_t STDCALL timezone_get_daylight_name(TIMEZONE_ENTRY *timezone, char *name, uint32_t len)
uint32_t STDCALL timezone_get_state_ex(TIMEZONE_ENTRY *timezone, double_t datetime)
Get the state of the supplied Timezone at the specified date and time.
#define TIMEZONE_NAME_LENGTH
Length of timezone name.
Definition timezone.h:47
uint32_t STDCALL timezone_get_name(TIMEZONE_ENTRY *timezone, char *name, uint32_t len)
double_t STDCALL timezone_get_standard_date(TIMEZONE_ENTRY *timezone, BOOL next)
uint32_t STDCALL(* timezone_enumerate_cb)(TIMEZONE_ENTRY *timezone, void *data)
Definition timezone.h:83
uint32_t STDCALL timezone_start_to_description(SYSTEMTIME *start, char *description, uint32_t len)
Get the description of the start date of a timezone.
uint32_t STDCALL timezone_update_environment(void)
Update the TZ environment variable to represent the current timezone.
struct _TIMEZONE_DATA TIMEZONE_DATA
Definition timezone.h:66
uint32_t STDCALL timezone_get_count(void)
Get the current timezone count.
int32_t STDCALL timezone_get_active_bias_ex(TIMEZONE_ENTRY *timezone, double_t datetime)
Get the bias (offset between UTC and Local) of the supplied Timezone at the specified date and time.
uint32_t STDCALL timezone_delete(TIMEZONE_ENTRY *timezone)
SYSTEMTIME STDCALL timezone_get_daylight_start(TIMEZONE_ENTRY *timezone)
uint32_t STDCALL timezone_set_default(TIMEZONE_ENTRY *timezone)
Set the current default timezone.
double_t STDCALL timezone_start_to_date_time(SYSTEMTIME *start, uint16_t year)
Calculate the start date and time from the start date of a timezone.
uint32_t STDCALL timezone_get_standard_name(TIMEZONE_ENTRY *timezone, char *name, uint32_t len)
TIMEZONE_ENTRY *STDCALL timezone_check(TIMEZONE_ENTRY *timezone)
Check if the supplied Timezone is in the Timezone table.
int32_t STDCALL timezone_get_standard_bias(TIMEZONE_ENTRY *timezone)
int32_t STDCALL timezone_get_bias(TIMEZONE_ENTRY *timezone)
TIMEZONE_ENTRY *STDCALL timezone_find(const char *name)
#define TIMEZONE_DESC_LENGTH
Length of timezone description.
Definition timezone.h:48
int32_t STDCALL timezone_get_active_bias(TIMEZONE_ENTRY *timezone)
Get the bias (offset between UTC and Local) of the supplied Timezone at the current date and time.
struct _TIMEZONE_ENTRY TIMEZONE_ENTRY
Definition timezone.h:80
TIMEZONE_ENTRY *STDCALL timezone_find_by_standard(const char *standardname)
TIMEZONE_ENTRY *STDCALL timezone_find_by_daylight(const char *daylightname)
SYSTEMTIME STDCALL timezone_get_standard_start(TIMEZONE_ENTRY *timezone)
double_t STDCALL timezone_get_daylight_date(TIMEZONE_ENTRY *timezone, BOOL next)
uint32_t STDCALL timezone_get_description(TIMEZONE_ENTRY *timezone, char *description, uint32_t len)