Bug 63566 - FILESAVE: Date will be changed when timezone of OS is changed
Summary: FILESAVE: Date will be changed when timezone of OS is changed
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Database (show other bugs)
Version: 3.3.0 release
Hardware: Other All
: medium critical
Assignee: Not Assigned
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-15 19:21 UTC by robert
Modified: 2015-01-03 17:40 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Testdatabase with dates in a date-field and dates in a varchar-field, formatted as dd.mm.yyyy (5.42 KB, application/vnd.oasis.opendocument.base)
2013-04-15 19:21 UTC, robert
Details

Description robert 2013-04-15 19:21:04 UTC
Created attachment 78013 [details]
Testdatabase with dates in a date-field and dates in a varchar-field, formatted as dd.mm.yyyy

1. Create a table with date-fields.
2. Put some date into this table.
3. Close LO
4. Change the timezone of your OS. For example from Europe/Berlin to Europe/Zürich. (with Linux/KDE in system-settings)
5. Open the database again. 
6. Have a look at the dates. 
7. Could be some dates have changed. (1 day lost or added)
8. Close LO.
9. Change timezone again to the first value, your default.
10. Open the database again and have a look at the table. The changed dates of No. 7 are also changed in the other timezone.

Could be this is a problem of the internal HSQLDB and couldn't be solved by LO. But the field "Date" in internal HSQLDB isn't able to save, for example, a birthday.
Comment 1 Ulrich Knoepfel 2013-04-16 09:45:03 UTC
This bug is quite annoying because it can create considerable damage. I hat to correct manually serverel hundreds of data.
Comment 2 robert 2013-04-29 19:27:50 UTC
The package "timezone" and "timezone-java" have had an update at my OpenSuSE 12.3 32bit rpm-System. So I tested this bug again. Changing from timezone "Berlin" to "Zürich" works now; changing from "Zürich" to "Vaduz" set 3 dates one day earlier.
Could be this isn't a bug of LO/HSQLDB but of the timezone currently working in Unix/Linux-systems?
Comment 3 Lionel Elie Mamane 2013-08-07 14:26:06 UTC
(In reply to comment #0)

> Could be this is a problem of the internal HSQLDB

That's most probably the case. I didn't find out in what
format rows (and data columns) are saved in the "data" file,
but it is plausible that the confusion in the standard Java
Date classes between the date "1 January 2012" and the timestamp
"1 January 2012 00:00:00" lead to some bogus timezone conversions
that leads to "1 January 2012 00:00:00" becoming e.g.
"31 December 2011 23:00:00", which would then be truncated
to "31 December 2011".

*But* the big hole in that theory is that example timezones
that you mention have AFAIK the same time (unless maybe that
was not the case in the early twentieth century, which is where
the dates of your examples are?).
Comment 4 Alex Thurgood 2015-01-03 17:40:27 UTC
Adding self to CC if not already on


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.