timezoneapi.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /**
  2. * This file is part of the mingw-w64 runtime package.
  3. * No warranty is given; refer to the file DISCLAIMER within this package.
  4. */
  5. #ifndef _TIMEZONEAPI_H_
  6. #define _TIMEZONEAPI_H_
  7. #include <apiset.h>
  8. #include <apisetcconv.h>
  9. #include <minwindef.h>
  10. #include <minwinbase.h>
  11. #ifdef __cplusplus
  12. extern "C" {
  13. #endif
  14. #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_APP)
  15. #define TIME_ZONE_ID_INVALID ((DWORD)0xffffffff)
  16. typedef struct _TIME_ZONE_INFORMATION {
  17. LONG Bias;
  18. WCHAR StandardName[32];
  19. SYSTEMTIME StandardDate;
  20. LONG StandardBias;
  21. WCHAR DaylightName[32];
  22. SYSTEMTIME DaylightDate;
  23. LONG DaylightBias;
  24. } TIME_ZONE_INFORMATION,*PTIME_ZONE_INFORMATION,*LPTIME_ZONE_INFORMATION;
  25. typedef struct _TIME_DYNAMIC_ZONE_INFORMATION {
  26. LONG Bias;
  27. WCHAR StandardName[32];
  28. SYSTEMTIME StandardDate;
  29. LONG StandardBias;
  30. WCHAR DaylightName[32];
  31. SYSTEMTIME DaylightDate;
  32. LONG DaylightBias;
  33. WCHAR TimeZoneKeyName[128];
  34. BOOLEAN DynamicDaylightTimeDisabled;
  35. } DYNAMIC_TIME_ZONE_INFORMATION,*PDYNAMIC_TIME_ZONE_INFORMATION;
  36. WINBASEAPI WINBOOL WINAPI SystemTimeToTzSpecificLocalTime (CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime);
  37. WINBASEAPI WINBOOL WINAPI TzSpecificLocalTimeToSystemTime (CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpLocalTime, LPSYSTEMTIME lpUniversalTime);
  38. WINBASEAPI WINBOOL WINAPI FileTimeToSystemTime (CONST FILETIME *lpFileTime, LPSYSTEMTIME lpSystemTime);
  39. WINBASEAPI WINBOOL WINAPI SystemTimeToFileTime (CONST SYSTEMTIME *lpSystemTime, LPFILETIME lpFileTime);
  40. WINBASEAPI DWORD WINAPI GetTimeZoneInformation (LPTIME_ZONE_INFORMATION lpTimeZoneInformation);
  41. #if _WIN32_WINNT >= 0x0600
  42. WINBASEAPI DWORD WINAPI GetDynamicTimeZoneInformation (PDYNAMIC_TIME_ZONE_INFORMATION pTimeZoneInformation);
  43. #endif
  44. #if _WIN32_WINNT >= 0x0601
  45. WINBOOL WINAPI GetTimeZoneInformationForYear (USHORT wYear, PDYNAMIC_TIME_ZONE_INFORMATION pdtzi, LPTIME_ZONE_INFORMATION ptzi);
  46. #endif
  47. #if _WIN32_WINNT >= 0x0602
  48. WINBASEAPI DWORD WINAPI EnumDynamicTimeZoneInformation (CONST DWORD dwIndex, PDYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation);
  49. WINBASEAPI DWORD WINAPI GetDynamicTimeZoneInformationEffectiveYears (CONST PDYNAMIC_TIME_ZONE_INFORMATION lpTimeZoneInformation, LPDWORD FirstYear, LPDWORD LastYear);
  50. WINBASEAPI WINBOOL WINAPI SystemTimeToTzSpecificLocalTimeEx (CONST DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime);
  51. WINBASEAPI WINBOOL WINAPI TzSpecificLocalTimeToSystemTimeEx (CONST DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpLocalTime, LPSYSTEMTIME lpUniversalTime);
  52. #endif
  53. #endif
  54. #if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
  55. WINBASEAPI WINBOOL WINAPI SetTimeZoneInformation (CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation);
  56. #if _WIN32_WINNT >= 0x0600
  57. WINBASEAPI WINBOOL WINAPI SetDynamicTimeZoneInformation (CONST DYNAMIC_TIME_ZONE_INFORMATION *lpTimeZoneInformation);
  58. #endif
  59. #endif
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif