projects
/
vuplus_xbmc
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b63730f
)
[linux] - fix wrong local FileTime due to not honoring daylight savings time
author
vdrfan
<vdrfan@xbmc.org>
Thu, 12 Sep 2013 16:36:15 +0000
(18:36 +0200)
committer
vdrfan
<vdrfan@xbmc.org>
Thu, 12 Sep 2013 16:36:15 +0000
(18:36 +0200)
xbmc/linux/XTimeUtils.cpp
patch
|
blob
|
history
diff --git
a/xbmc/linux/XTimeUtils.cpp
b/xbmc/linux/XTimeUtils.cpp
index
ace71a0
..
1d4d99a
100644
(file)
--- a/
xbmc/linux/XTimeUtils.cpp
+++ b/
xbmc/linux/XTimeUtils.cpp
@@
-83,7
+83,12
@@
BOOL FileTimeToLocalFileTime(const FILETIME* lpFileTime, LPFILETIME lpLocalFileT
l.u.LowPart = lpFileTime->dwLowDateTime;
l.u.HighPart = lpFileTime->dwHighDateTime;
- l.QuadPart -= (uint64_t) timezone * 10000000;
+ time_t ft;
+ struct tm tm_ft;
+ FileTimeToTimeT(lpFileTime, &ft);
+ localtime_r(&ft, &tm_ft);
+
+ l.QuadPart += tm_ft.tm_gmtoff * 10000000;
lpLocalFileTime->dwLowDateTime = l.u.LowPart;
lpLocalFileTime->dwHighDateTime = l.u.HighPart;