Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

72 lines
1.9 KiB

  1. //----------------------------------------------------------------------------
  2. //
  3. // Copyright (c) 1997-1999 Microsoft Corporation
  4. // All rights reserved.
  5. //
  6. // File Name:
  7. // timezone.h
  8. //
  9. // Description:
  10. // This file contains definitions for loading the timezone info
  11. // out of the registry and into internal data structs.
  12. //
  13. //----------------------------------------------------------------------------
  14. #define TZ_IDX_GMT 0x55 // Idx of GMT
  15. #define TZ_IDX_UNDEFINED -1 // Idx for nothing being set
  16. #define TZ_IDX_SETSAMEASSERVER -2 // Idx for Set Same As Server
  17. #define TZ_IDX_DONOTSPECIFY -3 // Idx for Do Not Specify this setting
  18. #define TZNAME_SIZE 128 // buffer size
  19. //
  20. // Registry key names for getting timezone info out of the registry.
  21. //
  22. #define REGKEY_TIMEZONES \
  23. _T("Software\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones")
  24. #define REGVAL_TZ_DISPLAY _T("Display")
  25. #define REGVAL_TZ_INDEX _T("Index")
  26. #define REGVAL_TZ_STDNAME _T("Std")
  27. //
  28. // This is where the timezone for the current machine lives. We use
  29. // this for the regload feature and strcmp CUR_STDNAME with the StdName
  30. // of each entry.
  31. //
  32. #define REGKEY_CUR_TIMEZONE \
  33. _T("System\\CurrentControlSet\\Control\\TimeZoneInformation")
  34. #define REGVAL_CUR_STDNAME _T("StandardName")
  35. //
  36. // For each valid timezone...
  37. //
  38. // DisplayName e.g. (GMT-08:00) Pacific Time
  39. // StdName e.g. Pacific Standard Time
  40. // Index Timezone=xx in the unattend.txt
  41. //
  42. // All of this info is in REGKEY_TIMEZONES
  43. //
  44. typedef struct {
  45. TCHAR DisplayName[TZNAME_SIZE];
  46. TCHAR StdName[TZNAME_SIZE];
  47. int Index;
  48. } TIME_ZONE_ENTRY;
  49. //
  50. // An array of time zone entries ...
  51. //
  52. typedef struct {
  53. int NumEntries; // size of array
  54. TIME_ZONE_ENTRY *TimeZones; // array of timezone entries
  55. } TIME_ZONE_LIST;