https://bugs.documentfoundation.org/show_bug.cgi?id=146502
Bug ID: 146502
Summary: EDITING In LO Base manually set column formats for
tables are erroneously reset to defaults
Product: LibreOffice
Version: unspecified
Hardware: x86-64 (AMD64)
OS: Windows (All)
Status: UNCONFIRMED
Severity: minor
Priority: medium
Component: Base
Assignee: [email protected]
Reporter: [email protected]
Description:
I have a database for family history that has some dates recorded under the
Julian calendar. In a form many of these dates cannot be entered as
date fields because forms limit dates to a minimum year of 1600. To get around
this restriction I followed the advice of Ratslinger in
https://ask.libreoffice.org/t/can-i-input-a-date-earlier-than-year-1583-in-lo-base-and-calc/22408
and changed my forms for inputting and updating dates to treat the fields as
text data rather than dates. I also changed the format of the
columns in my tables and views to my preferred format, YYYY-MM-DD.
This scheme works as long as the column formats in tables and views remain
YYYY-MM-DD. The problem is that every so often some column
formats are reset to MM/DD/YY.
I am at a loss to predict when or explain why the column formats will change or
which ones will change. Every time I execute LO I examine all the date columns
in my tables and views to make sure they are still YYYY-MM-DD and change them
back as necessary. The formats can remain YYYY-MM-DD for several days before
they are reset. Some days a few formats change. Some days many columns change.
Sometimes the column widths also change and sometimes they don't. In a table
with two date columns I have seen one column change and the other column not
change.
One trigger for changing most if not all column formats seems to be updating a
view -- any view. Other than that the resets seem random.
My preferred solution to this problem is to remove the minimum minimum date
restriction of year 1600 in the forms property window so that I can
display/alter date fields as dates and not be dependent on the current format
for a date column treated as text.
<rant>A minimum minimum year of 1600 seems arbitrary as it is unrelated to any
change in calendars and the places the calendars were adopted. For example,
although the Gregorian calendar was introduced in 1582 it was not universally
adopted at that time. England and its colonies did not adopt it until 1752.
(See https://en.wikipedia.org/wiki/Gregorian_calendar) Thus, many of the events
in the history of the American colonies occurred under the Julian calendar.
There are even a few places in the world where it is still used.
Nor is the minimum minimum date related to a limitation in SQL. The minimum
date in SQL seems to be 0001-01-01.
It is unclear what evil LO is trying to prevent with the 1600 cutoff. The
cutoff applies first to those designing forms and only secondly to end users of
the forms. Designers of forms should be given credit to know the range of dates
the forms will be processing and how to deal with the possibility of
non-Gregorian dates. If dates under the Julian calendar are needed and the
difference is important, designers can add a field to identify such a date and
make the appropriate adjustments. As a practical matter for my application the
difference between an early date under the Gregorian calendar and one under the
Julian calendar is very often not important since so many dates are merely
estimates or are only known to the year, not including month and day.
Moreover, the restriction on minimum dates is entirely pointless when it is so
easily circumvented by the scheme described above -- as long as the scheme
works, that is.<rant/>
Another solution would be to change the forms designer properties window to add
"Standard (ISO 8601)" to the list of format options for representing dates (the
list currently includes things like "Standard (short)", "Standard (long)"...)
then document that ISO 8601 envisions all dates as being under the Gregorian
calendar, including proleptic dates.
Steps to Reproduce:
1.As stated, problem seems random
2.Create a table with a date column
3.Set column format to YYYY-MM-DD
4.Wait a few days?
Actual Results:
Column format changes to MM/DD/YY
Expected Results:
Column format remains YYYY-MM-DD
Reproducible: Sometimes
User Profile Reset: No
Additional Info:
Version: 7.1.8.1 (x64) / LibreOffice Community
Build ID: e1f30c802c3269a1d052614453f260e49458c82c
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
--
You are receiving this mail because:
You are the assignee for the bug.