Bug 67186

Summary: VIEWING REPORTBUILDER: TIMESTAMP incorrectly displayed, (2 days behind)
Product: LibreOffice Reporter: jason
Component: DatabaseAssignee: Lionel Elie Mamane <lionel>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: lionel, robert
Version: 4.0.3.3 releaseKeywords: regression
Hardware: x86-64 (AMD64)   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=58805
https://bugs.freedesktop.org/show_bug.cgi?id=36858
https://bugs.freedesktop.org/show_bug.cgi?id=65354
https://bugs.freedesktop.org/show_bug.cgi?id=69873
Whiteboard: target:4.2.0 target:4.1.1 target:4.0.5
i915 platform: i915 features:

Description jason 2013-07-22 18:47:41 UTC
This bug is only present in the 4.x.x branch. Works in 3.6.7

Using a MySQL database with either a TIMESTAMP or a DATESTAMP field. It displays and behaves correctly in the Form editor. However in a REPORT, attempting to display it results in a incorrect date. For instance if I update a record on `7/22/13 2:25pm`, it will display the date of the timestamp 2 days in the past so that it appears `7/20/13 2:25pm`. I have confirmed in my case that the database contains the correct date and that in fact the REPORT component is incorrectly displaying the date by 2 days.

The behavior has remained constant throughout the various hours of the day.

LibreOffice version: as you know Report Builder in the 4.0.4 Release crashes Libre Office so I must use 4.0.3 (windows, portable)
Connection Type: JDBC, It is not the JDBC a fault. Libreoffice displays TIMESTAMP correctly in forms
Comment 1 jason 2013-07-22 18:56:06 UTC
I cannot supply a testcase as it (almost certainly, but untested) requires an external MySQL database. It may fail with other external databases as well.

In case you didn't catch it I am using a TIMESTAMP field, which automatically updates to the current date/time upon record change in my MySQL database. I require this feature to record when a particularly important record is changed.
Comment 2 robert 2013-07-23 14:38:36 UTC
I can confirm this behavior. Have tested with LO 4.0.2.2 and MariaDB - direct connection and JDBC - works both fine. Dates are correct in Timestamp and DateTime-fields in a report.
Same procedure with LO 4.0.3.3 and the shown dates in the report-builder are 2 days behind.
I have added Lionel. See https://bugs.freedesktop.org/show_bug.cgi?id=58805#c29
Comment 3 Lionel Elie Mamane 2013-07-23 15:15:04 UTC
Most probably caused by the fix to bug 36858
Comment 4 Commit Notification 2013-07-23 17:34:48 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=cab9b82fb31217223511afcea88ad7446999492b

fdo#67186 switch reporbuilder to null date == 1899-12-30



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Lionel Elie Mamane 2013-07-23 18:33:57 UTC
backport to 4.0.4 and 4.1.1 requested at
https://gerrit.libreoffice.org/5055
https://gerrit.libreoffice.org/5054
Comment 6 Commit Notification 2013-07-23 21:41:36 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=be945e8e54a93921a12597c7b3a5b012951600ac&h=libreoffice-4-1

fdo#67186 switch reporbuilder to null date == 1899-12-30


It will be available in LibreOffice 4.1.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2013-07-23 21:41:54 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ac2d93cca0791a728583a40dc379c89c22582855&h=libreoffice-4-0

fdo#67186 switch reporbuilder to null date == 1899-12-30


It will be available in LibreOffice 4.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2013-07-24 15:03:25 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=6bd204f6355b15632e6a9e94fd03faab769fdadd&h=libreoffice-4-0

fixup cherry-pick of fdo#67186 fix


It will be available in LibreOffice 4.0.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.