Line 0
Link Here
|
|
|
1 |
--- src/entries_parser.cpp Thu Feb 24 08:15:56 2005 |
2 |
+++ src/entries_parser.cpp Wed Mar 23 15:46:18 2005 |
3 |
@@ -246,14 +246,27 @@ |
4 |
|
5 |
int gm_sec = isoDateTime.mid(17,2).toInt(); |
6 |
|
7 |
- time_t utc_time = mktime(&m); |
8 |
+ time_t utc_time; |
9 |
|
10 |
+#if defined(__FreeBSD__) |
11 |
+ |
12 |
+ // BSD has inverse of gmtime() |
13 |
+ utc_time = timegm(&m); |
14 |
+ |
15 |
+#else |
16 |
+ |
17 |
+ // all others do mktime() and adjust timezone |
18 |
// mktime assumes broken-down time in local timezone, |
19 |
// to get UTC we need to correct result by timezone offset |
20 |
+ |
21 |
+ utc_time = mktime(&m); |
22 |
+ |
23 |
#if (_WINDOWS || ESVN_WIN ) |
24 |
utc_time -= _timezone; |
25 |
#else |
26 |
utc_time -= timezone; |
27 |
+#endif |
28 |
+ |
29 |
#endif |
30 |
|
31 |
// round to remove leap seconds in "right" timezones |