FreeRDP
winpr/libwinpr/timezone/timezone.c File Reference
#include <winpr/config.h>
#include <winpr/environment.h>
#include <winpr/wtypes.h>
#include <winpr/timezone.h>
#include <winpr/crt.h>
#include <winpr/file.h>
#include "../log.h"
#include <time.h>
#include <unistd.h>
#include "TimeZones.h"
#include "WindowsZones.h"

Macros

#define TAG   WINPR_TAG("timezone")
 

Functions

static UINT64 winpr_windows_gmtime (void)
 
static char * winpr_read_unix_timezone_identifier_from_file (FILE *fp)
 
static char * winpr_get_timezone_from_link (const char *links[], size_t count)
 
static char * winpr_get_unix_timezone_identifier_from_file (void)
 
static BOOL winpr_match_unix_timezone_identifier_with_list (const char *tzid, const char *list)
 
static TIME_ZONE_ENTRYwinpr_detect_windows_time_zone (void)
 
static const TIME_ZONE_RULE_ENTRYwinpr_get_current_time_zone_rule (const TIME_ZONE_RULE_ENTRY *rules, UINT32 count)
 
DWORD GetTimeZoneInformation (LPTIME_ZONE_INFORMATION lpTimeZoneInformation)
 
BOOL SetTimeZoneInformation (const TIME_ZONE_INFORMATION *lpTimeZoneInformation)
 
BOOL SystemTimeToFileTime (const SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime)
 
BOOL FileTimeToSystemTime (const FILETIME *lpFileTime, LPSYSTEMTIME lpSystemTime)
 
BOOL SystemTimeToTzSpecificLocalTime (LPTIME_ZONE_INFORMATION lpTimeZone, LPSYSTEMTIME lpUniversalTime, LPSYSTEMTIME lpLocalTime)
 
BOOL TzSpecificLocalTimeToSystemTime (LPTIME_ZONE_INFORMATION lpTimeZoneInformation, LPSYSTEMTIME lpLocalTime, LPSYSTEMTIME lpUniversalTime)
 
DWORD GetDynamicTimeZoneInformation (PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation)
 
BOOL SetDynamicTimeZoneInformation (const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation)
 
BOOL GetTimeZoneInformationForYear (USHORT wYear, PDYNAMIC_TIME_ZONE_INFORMATION pdtzi, LPTIME_ZONE_INFORMATION ptzi)
 
BOOL SystemTimeToTzSpecificLocalTimeEx (const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
 
BOOL TzSpecificLocalTimeToSystemTimeEx (const DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, const SYSTEMTIME *lpLocalTime, LPSYSTEMTIME lpUniversalTime)
 
DWORD EnumDynamicTimeZoneInformation (const DWORD dwIndex, PDYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation)
 
DWORD GetDynamicTimeZoneInformationEffectiveYears (const PDYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation, LPDWORD FirstYear, LPDWORD LastYear)
 

Macro Definition Documentation

◆ TAG

#define TAG   WINPR_TAG("timezone")

WinPR: Windows Portable Runtime Time Zone

Copyright 2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ EnumDynamicTimeZoneInformation()

DWORD EnumDynamicTimeZoneInformation ( const DWORD  dwIndex,
PDYNAMIC_TIME_ZONE_INFORMATION  lpTimeZoneInformation 
)

◆ FileTimeToSystemTime()

BOOL FileTimeToSystemTime ( const FILETIME *  lpFileTime,
LPSYSTEMTIME  lpSystemTime 
)

◆ GetDynamicTimeZoneInformation()

DWORD GetDynamicTimeZoneInformation ( PDYNAMIC_TIME_ZONE_INFORMATION  pTimeZoneInformation)

◆ GetDynamicTimeZoneInformationEffectiveYears()

DWORD GetDynamicTimeZoneInformationEffectiveYears ( const PDYNAMIC_TIME_ZONE_INFORMATION  lpTimeZoneInformation,
LPDWORD  FirstYear,
LPDWORD  LastYear 
)

◆ GetTimeZoneInformation()

DWORD GetTimeZoneInformation ( LPTIME_ZONE_INFORMATION  lpTimeZoneInformation)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetTimeZoneInformationForYear()

BOOL GetTimeZoneInformationForYear ( USHORT  wYear,
PDYNAMIC_TIME_ZONE_INFORMATION  pdtzi,
LPTIME_ZONE_INFORMATION  ptzi 
)

◆ SetDynamicTimeZoneInformation()

BOOL SetDynamicTimeZoneInformation ( const DYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation)

◆ SetTimeZoneInformation()

BOOL SetTimeZoneInformation ( const TIME_ZONE_INFORMATION lpTimeZoneInformation)

◆ SystemTimeToFileTime()

BOOL SystemTimeToFileTime ( const SYSTEMTIME *  lpSystemTime,
LPFILETIME  lpFileTime 
)

◆ SystemTimeToTzSpecificLocalTime()

BOOL SystemTimeToTzSpecificLocalTime ( LPTIME_ZONE_INFORMATION  lpTimeZone,
LPSYSTEMTIME  lpUniversalTime,
LPSYSTEMTIME  lpLocalTime 
)

◆ SystemTimeToTzSpecificLocalTimeEx()

BOOL SystemTimeToTzSpecificLocalTimeEx ( const DYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation,
const SYSTEMTIME *  lpUniversalTime,
LPSYSTEMTIME  lpLocalTime 
)

◆ TzSpecificLocalTimeToSystemTime()

BOOL TzSpecificLocalTimeToSystemTime ( LPTIME_ZONE_INFORMATION  lpTimeZoneInformation,
LPSYSTEMTIME  lpLocalTime,
LPSYSTEMTIME  lpUniversalTime 
)

◆ TzSpecificLocalTimeToSystemTimeEx()

BOOL TzSpecificLocalTimeToSystemTimeEx ( const DYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation,
const SYSTEMTIME *  lpLocalTime,
LPSYSTEMTIME  lpUniversalTime 
)

◆ winpr_detect_windows_time_zone()

static TIME_ZONE_ENTRY* winpr_detect_windows_time_zone ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_get_current_time_zone_rule()

static const TIME_ZONE_RULE_ENTRY* winpr_get_current_time_zone_rule ( const TIME_ZONE_RULE_ENTRY rules,
UINT32  count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_get_timezone_from_link()

static char* winpr_get_timezone_from_link ( const char *  links[],
size_t  count 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_get_unix_timezone_identifier_from_file()

static char* winpr_get_unix_timezone_identifier_from_file ( void  )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_match_unix_timezone_identifier_with_list()

static BOOL winpr_match_unix_timezone_identifier_with_list ( const char *  tzid,
const char *  list 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_read_unix_timezone_identifier_from_file()

static char* winpr_read_unix_timezone_identifier_from_file ( FILE *  fp)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ winpr_windows_gmtime()

static UINT64 winpr_windows_gmtime ( void  )
static
Here is the caller graph for this function: