Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7567db85
Commit
7567db85
authored
Jul 24, 2014
by
Michael Müller
Committed by
Alexandre Julliard
Apr 28, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Add support for Dynamic DST (daylight saving time) information in registry.
parent
78e7eac8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
5 deletions
+29
-5
time.c
dlls/ntdll/time.c
+29
-5
No files found.
dlls/ntdll/time.c
View file @
7567db85
...
@@ -592,11 +592,23 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
...
@@ -592,11 +592,23 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
'W'
,
'i'
,
'n'
,
'd'
,
'o'
,
'w'
,
's'
,
' '
,
'N'
,
'T'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'V'
,
'e'
,
'r'
,
's'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'T'
,
'i'
,
'm'
,
'e'
,
' '
,
'Z'
,
'o'
,
'n'
,
'e'
,
's'
,
0
};
'T'
,
'i'
,
'm'
,
'e'
,
' '
,
'Z'
,
'o'
,
'n'
,
'e'
,
's'
,
0
};
static
const
WCHAR
Dynamic_DstW
[]
=
{
'D'
,
'y'
,
'n'
,
'a'
,
'm'
,
'i'
,
'c'
,
' '
,
'D'
,
'S'
,
'T'
,
0
};
static
const
WCHAR
fmtW
[]
=
{
'%'
,
'd'
,
0
};
HANDLE
hkey
;
HANDLE
hkey
;
ULONG
idx
;
ULONG
idx
;
OBJECT_ATTRIBUTES
attr
;
OBJECT_ATTRIBUTES
attr
,
attrDynamic
;
UNICODE_STRING
nameW
;
UNICODE_STRING
nameW
,
nameDynamicW
;
WCHAR
buf
[
128
];
WCHAR
buf
[
128
],
yearW
[
16
];
sprintfW
(
yearW
,
fmtW
,
tzi
->
DaylightDate
.
wYear
);
attrDynamic
.
Length
=
sizeof
(
attrDynamic
);
attrDynamic
.
RootDirectory
=
0
;
/* will be replaced later */
attrDynamic
.
ObjectName
=
&
nameDynamicW
;
attrDynamic
.
Attributes
=
0
;
attrDynamic
.
SecurityDescriptor
=
NULL
;
attrDynamic
.
SecurityQualityOfService
=
NULL
;
RtlInitUnicodeString
(
&
nameDynamicW
,
Dynamic_DstW
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
Length
=
sizeof
(
attr
);
attr
.
RootDirectory
=
0
;
attr
.
RootDirectory
=
0
;
...
@@ -622,7 +634,9 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
...
@@ -622,7 +634,9 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
static
const
WCHAR
dltW
[]
=
{
'D'
,
'l'
,
't'
,
0
};
static
const
WCHAR
dltW
[]
=
{
'D'
,
'l'
,
't'
,
0
};
static
const
WCHAR
tziW
[]
=
{
'T'
,
'Z'
,
'I'
,
0
};
static
const
WCHAR
tziW
[]
=
{
'T'
,
'Z'
,
'I'
,
0
};
RTL_TIME_ZONE_INFORMATION
reg_tzi
;
RTL_TIME_ZONE_INFORMATION
reg_tzi
;
HANDLE
hSubkey
;
HANDLE
hSubkey
,
hSubkeyDynamicDST
;
BOOL
is_dynamic
=
FALSE
;
struct
tz_reg_data
struct
tz_reg_data
{
{
LONG
bias
;
LONG
bias
;
...
@@ -654,7 +668,17 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
...
@@ -654,7 +668,17 @@ static void find_reg_tz_info(RTL_TIME_ZONE_INFORMATION *tzi)
get_value
(
hSubkey
,
stdW
,
REG_SZ
,
reg_tzi
.
StandardName
,
sizeof
(
reg_tzi
.
StandardName
));
get_value
(
hSubkey
,
stdW
,
REG_SZ
,
reg_tzi
.
StandardName
,
sizeof
(
reg_tzi
.
StandardName
));
get_value
(
hSubkey
,
dltW
,
REG_SZ
,
reg_tzi
.
DaylightName
,
sizeof
(
reg_tzi
.
DaylightName
));
get_value
(
hSubkey
,
dltW
,
REG_SZ
,
reg_tzi
.
DaylightName
,
sizeof
(
reg_tzi
.
DaylightName
));
get_value
(
hSubkey
,
tziW
,
REG_BINARY
,
&
tz_data
,
sizeof
(
tz_data
));
/* Check for Dynamic DST entry first */
attrDynamic
.
RootDirectory
=
hSubkey
;
if
(
!
NtOpenKey
(
&
hSubkeyDynamicDST
,
KEY_READ
,
&
attrDynamic
))
{
is_dynamic
=
reg_query_value
(
hSubkeyDynamicDST
,
yearW
,
REG_BINARY
,
&
tz_data
,
sizeof
(
tz_data
));
NtClose
(
hSubkeyDynamicDST
);
}
if
(
!
is_dynamic
)
get_value
(
hSubkey
,
tziW
,
REG_BINARY
,
&
tz_data
,
sizeof
(
tz_data
));
#undef get_value
#undef get_value
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment