https://bugs.documentfoundation.org/show_bug.cgi?id=127170
Eike Rathke <er...@redhat.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |er...@redhat.com
--- Comment #3 from Eike Rathke <er...@redhat.com> ---
(In reply to Albrecht Müller from comment #0)
> I observed some quite strange
> features of the time formatting mechanism, e.g. the time 23:57:00 gets
> formatted to “1437” using the format string “[MM]” but to “Minutes: [57]
> Month: 12” ( Version 6.0.4.2 (x64) on Windows) or to “Minutes: [12] Month:
> 12” (Version 6.2.6.2 Ubuntu) by the format string “"Minutes: "[MM]" Month:
> "M”. What is the correct interpretation of the format string parts “[MM]” or
> “MM”? How does it depend on the context?
This is a bit nasty as using both the [MM] and the M codes in one format seems
to trick out the type detection, i.e. after defining it the format at the end
is classified as Date format (see category where it's then assigned to). Now
datetime formats do not know anything about duration hence the first MM is
taken as a code for minute of time and the second M as a code for month, where
the wall clock minute value is 57. Note that also the brackets around [MM] are
displayed literally because in a datetime format they don't have a special
meaning. Then as a consequence when saving the document the format is saved as
<number:date-style style:name="N111">
<number:text>Minutes: [</number:text>
<number:minutes number:style="long"/>
<number:text>] Month: </number:text>
<number:month/>
</number:date-style>
which when loaded again results in the format code string
"Minutes: ["MM"] Month: "M
but then both the MM and the M denote a month keyword because there isn't an
unquoted [MM]. This appears to be a bug (because in the file format there's the
number:minutes element) but I think it's not easily solvable due to the
ambiguity of MM.
I doubt there's a difference between Linux and Windows, but you simply tried to
load the saved document on the other platform, where it then behaves different
as explained.
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs