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
4cf122d2
Commit
4cf122d2
authored
Oct 26, 2004
by
Rein Klazes
Committed by
Alexandre Julliard
Oct 26, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Correctly use the return value of GetTimeZoneInformation.
parent
63fe9d44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
time.c
dlls/kernel/tests/time.c
+9
-7
No files found.
dlls/kernel/tests/time.c
View file @
4cf122d2
...
@@ -34,11 +34,11 @@ void test_GetTimeZoneInformation()
...
@@ -34,11 +34,11 @@ void test_GetTimeZoneInformation()
{
{
TIME_ZONE_INFORMATION
tzinfo
,
tzinfo1
;
TIME_ZONE_INFORMATION
tzinfo
,
tzinfo1
;
DWORD
res
=
GetTimeZoneInformation
(
&
tzinfo
);
DWORD
res
=
GetTimeZoneInformation
(
&
tzinfo
);
ok
(
res
!=
0
,
"GetTimeZoneInformation failed
\n
"
);
ok
(
res
!=
TIME_ZONE_ID_INVALID
,
"GetTimeZoneInformation failed
\n
"
);
ok
(
SetEnvironmentVariableA
(
"TZ"
,
"GMT0"
)
!=
0
,
ok
(
SetEnvironmentVariableA
(
"TZ"
,
"GMT0"
)
!=
0
,
"SetEnvironmentVariableA failed
\n
"
);
"SetEnvironmentVariableA failed
\n
"
);
res
=
GetTimeZoneInformation
(
&
tzinfo1
);
res
=
GetTimeZoneInformation
(
&
tzinfo1
);
ok
(
res
!=
0
,
"GetTimeZoneInformation failed
\n
"
);
ok
(
res
!=
TIME_ZONE_ID_INVALID
,
"GetTimeZoneInformation failed
\n
"
);
ok
(((
tzinfo
.
Bias
==
tzinfo1
.
Bias
)
&&
ok
(((
tzinfo
.
Bias
==
tzinfo1
.
Bias
)
&&
(
tzinfo
.
StandardBias
==
tzinfo1
.
StandardBias
)
&&
(
tzinfo
.
StandardBias
==
tzinfo1
.
StandardBias
)
&&
...
@@ -82,10 +82,12 @@ void test_FileTimeToLocalFileTime()
...
@@ -82,10 +82,12 @@ void test_FileTimeToLocalFileTime()
SYSTEMTIME
st
;
SYSTEMTIME
st
;
TIME_ZONE_INFORMATION
tzinfo
;
TIME_ZONE_INFORMATION
tzinfo
;
DWORD
res
=
GetTimeZoneInformation
(
&
tzinfo
);
DWORD
res
=
GetTimeZoneInformation
(
&
tzinfo
);
ULONGLONG
time
=
(
ULONGLONG
)
TICKSPERSEC
+
TICKS_1601_TO_1970
ULONGLONG
time
=
(
ULONGLONG
)
TICKSPERSEC
+
TICKS_1601_TO_1970
+
+
(
ULONGLONG
)
tzinfo
.
Bias
*
SECSPERMIN
*
TICKSPERSEC
;
(
LONGLONG
)(
tzinfo
.
Bias
+
(
res
==
TIME_ZONE_ID_STANDARD
?
tzinfo
.
StandardBias
:
ok
(
res
!=
0
,
"GetTimeZoneInformation failed
\n
"
);
(
res
==
TIME_ZONE_ID_DAYLIGHT
?
tzinfo
.
DaylightBias
:
0
)))
*
SECSPERMIN
*
TICKSPERSEC
;
ok
(
res
!=
TIME_ZONE_ID_INVALID
,
"GetTimeZoneInformation failed
\n
"
);
ft
.
dwHighDateTime
=
(
UINT
)(
time
>>
32
);
ft
.
dwHighDateTime
=
(
UINT
)(
time
>>
32
);
ft
.
dwLowDateTime
=
(
UINT
)
time
;
ft
.
dwLowDateTime
=
(
UINT
)
time
;
ok
(
FileTimeToLocalFileTime
(
&
ft
,
&
lft
)
!=
0
,
ok
(
FileTimeToLocalFileTime
(
&
ft
,
&
lft
)
!=
0
,
...
@@ -100,7 +102,7 @@ void test_FileTimeToLocalFileTime()
...
@@ -100,7 +102,7 @@ void test_FileTimeToLocalFileTime()
ok
(
SetEnvironmentVariableA
(
"TZ"
,
"GMT"
)
!=
0
,
ok
(
SetEnvironmentVariableA
(
"TZ"
,
"GMT"
)
!=
0
,
"SetEnvironmentVariableA failed
\n
"
);
"SetEnvironmentVariableA failed
\n
"
);
ok
(
res
!=
0
,
"GetTimeZoneInformation failed
\n
"
);
ok
(
res
!=
TIME_ZONE_ID_INVALID
,
"GetTimeZoneInformation failed
\n
"
);
ok
(
FileTimeToLocalFileTime
(
&
ft
,
&
lft
)
!=
0
,
ok
(
FileTimeToLocalFileTime
(
&
ft
,
&
lft
)
!=
0
,
"FileTimeToLocalFileTime() failed with Error 0x%08lx
\n
"
,
GetLastError
());
"FileTimeToLocalFileTime() failed with Error 0x%08lx
\n
"
,
GetLastError
());
FileTimeToSystemTime
(
&
lft
,
&
st
);
FileTimeToSystemTime
(
&
lft
,
&
st
);
...
...
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