Commit graph

6 commits

Author SHA1 Message Date
Stanislav Motylkov d5bd08fca4
[REACTOS][CPL] Coding style fixes only 2022-10-04 21:14:31 +03:00
Hermès Bélusca-Maïto aa69236646
[TIMEDATE.CPL] In case TimeZone data does not contain a valid StandardName, perform comparisons against the time-zone numerical values instead.
It may happen that the time-zone information in the registry key
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
contains an empty StandardName / DaylightName, or is too long for the
standard maximum 32-character length, and therefore is returned empty.
And/or it may happen as well that some of the standard names (value "Std")
present in some of the time zones listed in
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones
are similarly too long, and therefore are returned as empty strings.

In case this happens, perform comparisons instead with the numerical
values Bias, StandardBias, DaylightBias, StandardDate and DaylightDate
in order to find a match.

It is interesting to note also that in Vista+ there is an additional
REG_SZ value "TimeZoneKeyName" in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation
that allows to directly find a match in the time zones list in
"Windows NT\CurrentVersion\Time Zones".
2020-04-22 00:58:34 +02:00
Hermès Bélusca-Maïto 7c3e96a26a
[TIMEDATE.CPL][SYSSETUP][TZLIB] Introduce a small static library "tzlib": "TimeZone Utilities Library", and use it in timedate.cpl and syssetup.dll.
This small win32 library provides time-zone utility wrappers around
Win32 functions, that are used by different ReactOS modules such as
timedate.cpl, syssetup.dll, and a possible future 'tzutil' tool.

The code has been extracted from the common code found in both
timedate.cpl and syssetup.dll.
2020-04-22 00:58:32 +02:00
Mark Jansen bae083355d
[SYSSETUP] Add a missing break 2019-04-03 19:44:16 +02:00
Timo Kreuzer 0182dcd71b [PSDK][REACTOS] Fix definitions and usage of DWLP_MSGRESULT, DWLP_DLGPROC, and DWLP_USER
- Make sure the DWLP_* values are correct on _WIN64
- Don't use the DWL_* constants, they are not portable. Enforce this by removing them entirely from winuser.h
- Make sure Get/SetWindowLong*Ptr* is used and pointers are not truncated to LONG
2018-03-04 16:27:07 +01:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/dll/cpl/timedate/timezone.c (Browse further)