summaryrefslogtreecommitdiff
path: root/doc/bugs/Windows_file_timestamp_timezone_madness/comment_5_0739426403f5bf9954acbc86ca0d11ea._comment
blob: ac1f090f519f2dc09a6ae28f2d50bd50c7d447b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
[[!comment format=mdwn
 username="http://joeyh.name/"
 ip="108.236.230.124"
 subject="comment 5"
 date="2014-06-11T23:02:28Z"
 content="""
I've developed a fix for the time library. This patch has been sent to the author, hopefully it will get applied and then I can use getCurrentTImeZone. Note that git-annex would need to unset TZ first, which might be hard on windows.

<pre>
diff --git a/cbits/HsTime.c b/cbits/HsTime.c
index cfafb27..86ca92a 100644
--- a/cbits/HsTime.c
+++ b/cbits/HsTime.c
@@ -8,6 +8,7 @@ long int get_current_timezone_seconds (time_t t,int* pdst,char const* * pname)
     tzset();
     struct tm* ptm = localtime_r(&t,&tmd);
 #else
+    tzset();
     struct tm* ptm = localtime(&t);
 #endif
     if (ptm)
</pre>
"""]]