Merge lp:~zorba-coders/zorba/bug-988412 into lp:zorba

Proposed by Matthias Brantner
Status: Merged
Approved by: Matthias Brantner
Approved revision: 10800
Merged at revision: 10800
Proposed branch: lp:~zorba-coders/zorba/bug-988412
Merge into: lp:zorba
Diff against target: 43 lines (+8/-5)
2 files modified
ChangeLog (+1/-0)
modules/com/zorba-xquery/www/modules/datetime.xq.src/datetime.cpp (+7/-5)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-988412
Reviewer Review Type Date Requested Status
William Candillon Approve
Matthias Brantner Approve
Review via email: mp+103523@code.launchpad.net

Commit message

fix for bug #988412 (date:current-dateTime daylight saving)

Description of the change

fix for bug #988412 (date:current-dateTime daylight saving)

To post a comment you must log in.
Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-988412-2012-04-25T17-54-01.991Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
William Candillon (wcandillon) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-988412-2012-04-25T18-40-21.164Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-04-24 12:39:38 +0000
3+++ ChangeLog 2012-04-25 17:27:26 +0000
4@@ -30,6 +30,7 @@
5 * Fixed performance problem with the findNodeSources function of the no-copy rule
6 * Fixed bug #872234 (prevent a rewritting to take place in case of sequential expr)
7 * Fixed bug #906494 (default compile with D_FILE_OFFSET_BITS=64)
8+ * Fixed bug #988412 (date:current-dateTime daylight saving)
9 * Fixed bug #912586, #912593 and #912722 (assertion failures with lax validation)
10 * Fixed bug #921458 (file:read-text-lines() blocking)
11 * Fixed bug #981405 (do not hoist expr containing try-catch variables out of the
12
13=== modified file 'modules/com/zorba-xquery/www/modules/datetime.xq.src/datetime.cpp'
14--- modules/com/zorba-xquery/www/modules/datetime.xq.src/datetime.cpp 2012-04-24 12:39:38 +0000
15+++ modules/com/zorba-xquery/www/modules/datetime.xq.src/datetime.cpp 2012-04-25 17:27:26 +0000
16@@ -32,21 +32,23 @@
17 long& timezone,
18 unsigned short& millitm)
19 {
20+ int lSummerTimeShift = 0;
21 #if defined (WIN32)
22 struct _timeb timebuffer;
23 _ftime_s( &timebuffer );
24 localtime_s(&gmtm, &timebuffer.time); //thread safe localtime on Windows
25+ lSummerTimeShift = -timebuffer.timezone * 60;
26+ if (gmtm.tm_isdst != 0)
27+ lSummerTimeShift += 3600;
28 #else
29 struct timeb timebuffer;
30 ftime( &timebuffer );
31 localtime_r(&timebuffer.time, &gmtm); //thread safe localtime on Linux
32+ localtime_r(&timebuffer.time, &gmtm); //thread safe localtime on Linux
33+ lSummerTimeShift = gmtm.tm_gmtoff;
34 #endif
35
36- int lSummerTimeShift = 0;
37- if (gmtm.tm_isdst != 0)
38- lSummerTimeShift = 3600;
39-
40- timezone = -timebuffer.timezone * 60 + lSummerTimeShift; // in seconds
41+ timezone = lSummerTimeShift; // in seconds
42 millitm = timebuffer.millitm;
43 }
44

Subscribers

People subscribed via source and target branches