Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
95efcca3
Commit
95efcca3
authored
Aug 31, 2023
by
Jeff Smith
Committed by
Alexandre Julliard
Sep 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shlwapi: Fix SHFormatDateTime implementation during DST.
parent
9bc503b6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
ordinal.c
dlls/shlwapi/ordinal.c
+2
-3
ordinal.c
dlls/shlwapi/tests/ordinal.c
+0
-7
No files found.
dlls/shlwapi/ordinal.c
View file @
95efcca3
...
...
@@ -4288,7 +4288,6 @@ INT WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *fileTime, DWORD *flags,
#define SHFORMATDT_UNSUPPORTED_FLAGS (FDTF_RELATIVE | FDTF_LTRDATE | FDTF_RTLDATE | FDTF_NOAUTOREADINGORDER)
DWORD
fmt_flags
=
flags
?
*
flags
:
FDTF_DEFAULT
;
SYSTEMTIME
st
;
FILETIME
ft
;
INT
ret
=
0
;
TRACE
(
"%p %p %p %u
\n
"
,
fileTime
,
flags
,
buf
,
size
);
...
...
@@ -4299,8 +4298,8 @@ INT WINAPI SHFormatDateTimeW(const FILETIME UNALIGNED *fileTime, DWORD *flags,
if
(
fmt_flags
&
SHFORMATDT_UNSUPPORTED_FLAGS
)
FIXME
(
"ignoring some flags - 0x%08lx
\n
"
,
fmt_flags
&
SHFORMATDT_UNSUPPORTED_FLAGS
);
FileTimeTo
LocalFileTime
(
fileTime
,
&
f
t
);
FileTimeToSystemTime
(
&
f
t
,
&
st
);
FileTimeTo
SystemTime
(
fileTime
,
&
s
t
);
SystemTimeToTzSpecificLocalTime
(
NULL
,
&
s
t
,
&
st
);
/* first of all date */
if
(
fmt_flags
&
(
FDTF_LONGDATE
|
FDTF_SHORTDATE
))
...
...
dlls/shlwapi/tests/ordinal.c
View file @
95efcca3
...
...
@@ -1739,7 +1739,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ok
(
ret
==
lstrlenA
(
buff
)
+
1
,
"got %d
\n
"
,
ret
);
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
TIME_NOSECONDS
|
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff2
,
sizeof
(
buff2
));
ok
(
ret
==
lstrlenA
(
buff2
)
+
1
,
"got %d
\n
"
,
ret
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff
,
buff2
)
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s)
\n
"
,
buff2
,
buff
);
...
...
@@ -1748,7 +1747,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ok
(
ret
==
lstrlenA
(
buff
)
+
1
,
"got %d
\n
"
,
ret
);
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff2
,
sizeof
(
buff2
));
ok
(
ret
==
lstrlenA
(
buff2
)
+
1
,
"got %d
\n
"
,
ret
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff
,
buff2
)
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s)
\n
"
,
buff2
,
buff
);
...
...
@@ -1758,7 +1756,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ok
(
ret
==
lstrlenA
(
buff
)
+
1
,
"got %d
\n
"
,
ret
);
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff2
,
sizeof
(
buff2
));
ok
(
ret
==
lstrlenA
(
buff2
)
+
1
,
"got %d
\n
"
,
ret
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff
,
buff2
)
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s)
\n
"
,
buff2
,
buff
);
...
...
@@ -1790,7 +1787,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ok
(
ret
==
lstrlenA
(
buff
)
+
1
,
"got %d, length %d
\n
"
,
ret
,
lstrlenA
(
buff
)
+
1
);
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
TIME_NOSECONDS
|
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff3
,
sizeof
(
buff3
));
ok
(
ret
==
lstrlenA
(
buff3
)
+
1
,
"got %d
\n
"
,
ret
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff3
,
buff
+
lstrlenA
(
buff
)
-
lstrlenA
(
buff3
))
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s) for time part
\n
"
,
buff3
,
buff
+
lstrlenA
(
buff
)
-
lstrlenA
(
buff3
));
...
...
@@ -1805,7 +1801,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ok
(
ret
==
lstrlenA
(
buff
)
+
1
,
"got %d
\n
"
,
ret
);
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff3
,
sizeof
(
buff3
));
ok
(
ret
==
lstrlenA
(
buff3
)
+
1
,
"got %d
\n
"
,
ret
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff3
,
buff
+
lstrlenA
(
buff
)
-
lstrlenA
(
buff3
))
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s) for time part
\n
"
,
buff3
,
buff
+
lstrlenA
(
buff
)
-
lstrlenA
(
buff3
));
...
...
@@ -1824,7 +1819,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
TIME_NOSECONDS
|
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff3
,
sizeof
(
buff3
));
ok
(
ret
==
lstrlenA
(
buff3
)
+
1
,
"got %d
\n
"
,
ret
);
strcat
(
buff2
,
buff3
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff
,
buff2
)
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s)
\n
"
,
buff2
,
buff
);
...
...
@@ -1837,7 +1831,6 @@ static void test_SHFormatDateTimeA(const SYSTEMTIME *st)
ret
=
GetTimeFormatA
(
LOCALE_USER_DEFAULT
,
LOCALE_USE_CP_ACP
,
st
,
NULL
,
buff3
,
sizeof
(
buff3
));
ok
(
ret
==
lstrlenA
(
buff3
)
+
1
,
"got %d
\n
"
,
ret
);
strcat
(
buff2
,
buff3
);
todo_wine_if
(
!
dstMatch
)
ok
(
lstrcmpA
(
buff
,
buff2
)
==
0
||
broken
(
!
dstMatch
)
/* pre Windows 7 */
,
"expected (%s), got (%s)
\n
"
,
buff2
,
buff
);
}
...
...
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