[Libreoffice-bugs] [Bug 121851] Calc loses time zone information for datetime cells

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Dec 4 19:52:12 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=121851

Eike Rathke <erack at redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
            Version|6.2.0.0.beta1+              |unspecified

--- Comment #2 from Eike Rathke <erack at redhat.com> ---
There is no way time zone information can be stored at current datetime cells,
as a date+time value is just a date serial number with fraction as time (0.5 ==
12h). That is during runtime, ODF .ods is different. We would have to come up
with a new cell type for this that preserves time zone information, probably
plus number format codes to display in different time zones or a conversion
function.

It would be interesting how Excel treats datetime with time zone information.
ECMA L.2.16.9 Dates and Times says timezone can be stored, but gives no hint
what to do with it. Contrary to L.2.16.9.1 Date Conversion for Serial Values
that says it has no timezone information and represents UTC (which is quite
nonsense as any datetime value a user entered has no time zone information at
all, not even UTC, and mostly is the user's local time). Also 18.17.4
Dates and Times does not mention time zones at all.

As is, with date+time serial numbers we could only convert datetime with time
zone to an UTC datetime and throw the time zone away. But as this would discard
information and result in unexpected times we don't. It is also the reason why
entering an ISO 8601 string with time zone does not result in a numeric
datetime cell but content of type Text instead.

Specifically one does not want to see different times just because viewing data
someone entered in a different time zone, especially not if that time has no
time zone information.

As an interim solution we maybe could come up with a new datetime+timezone
function that parses an ISO 8601 string and converts it to any other time zone,
or converts to/from date+timme serial numbers without time zone information
with some option to specify whether UTC or (which) local time they represent.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20181204/82f945cc/attachment-0001.html>


More information about the Libreoffice-bugs mailing list