https://bugs.freedesktop.org/show_bug.cgi?id=65209

--- Comment #4 from Lionel Elie Mamane <lio...@mamane.lu> ---
(In reply to comment #3)
> problem is that LO has never supported timezones in Document Properties.
> but i believe it should be possible to do this properly with the
> API changes to com.sun.star.util.DateTime for LO 4.1,

Nothing happened wrt to timezone for 4.1. I originally planned to
add timezone support in some way, but it did not happen yet.

I expect that such a support is not necessary for this bug, though. That's how
I would do it: If the timestamp (datetime) in the file is given "with
timezone", it should be converted to UTC upon reading, stored in memory as UTC
and converted to localtime for display.

When writing a file, we can just store the time always as UTC.

> likely the Document Properties dialog in sfx2/source/dialog/dinfdlg.cxx
> needs a little tweak to evaluate the timezone,
> and/or the DocumentSummaryInformation
> import/export in sfx2/source/doc/docinf.cxx needs to be taught
> about timezones.

Reading this file, sfx2/source/doc/oleprops.cxx and
tools/source/datetime/datetime.cxx, from the comments the intention of the
current design seems to be to convert to *local* time upon reading and then
keep everything in local time. That can work too.

I don't see this conversion happening, though:

 - SfxOleFileTimeProperty::ImplLoad seems to read two "raw" 32-bit values
   from the file (the SvStream is the file I presume?)
 - and passes them to DateTime::CreateFromWin32FileDateTime
 - which possibly buggily (e.g. it ignores leap seconds) converts that
   to a ::DateTime

But possibly I'm missing it in some other place.

This seems to suggest that the file does not contain any timezone information
after all... So the bug is in being *consistent* throughout internal
LibreOffice code (either use localtime everywhere, or UTC everywhere), or in
the conversion to localtime for display, or something like that.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to