[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

Eike Rathke  changed:

   What|Removed |Added

  Component|LibreOffice |Base
Version|7.4.2.3 release |unspecified
   Assignee|libreoffice-b...@lists.free |er...@redhat.com
   |desktop.org |
 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #12 from Eike Rathke  ---
(In reply to jcsanz from comment #11)
> (In reply to Eike Rathke from comment #10)
> > that apparently has bugs with at least negative
> > proleptic Gregorian dates.
> 
> With negative dates and 0001-01-01 and 0001-01-02.
Note that around BCE/CE the difference between Julian and proleptic Gregorian
calendar is 2 days, the Julian 0001-01-01 and 0001-01-02 dates are already
negative proleptic Gregorian calendar dates.


> Well, ok ... but... If I've been taught that America was discover on October
> 12th, 1472, what calendar was using my teacher?
Certainly not a Gregorian calendar.


> I don't know, but I expect
> that if write 1472-10-12 (or 12/10/1472) it remains the same in Calc, in
> Writer, in Base and in whatever place it was used.
As said, there's a bug in the conversion to formatted field strings in the
database view.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #11 from jcs...@libreoffice.org ---
(In reply to Eike Rathke from comment #10)
> (In reply to jcsanz from comment #0)
> > 13. In the Field Format dialog box, in the Category list, select Date,
> > and in the Format list, select 31/12/1999. Click the OK button. This will
> > display the date in the same format as on the original Calc sheet.
> That of course depends on the current locale and everyone will see something
> different with the default date format, i.e. in an en-CA locale the default
> format is -MM-DD

Of course, depend on the locale you can view the date in a different way, but
the date should be the same

> 
> Now to the symptom: registering the Calc sheet as database and displaying
> that converts content to a database view using formatted fields, with some
> back-and-forth conversion (serial date number offset from the null-date to
> date and back) involved that apparently has bugs with at least negative
> proleptic Gregorian dates.

With negative dates and 0001-01-01 and 0001-01-02. And maybe other different
dates see tdf#152118

> > Gregorian proleptic calendar) and is a date that exists (this is 0001-01-01
> > BC).
> Actually 0001-12-31 BCE ...

Yes, of course, it was a slip

> Input happens in the locale's default calendar, usually Gregorian, but for
> dates before the Gregorian cut-off date (common is 1582-10-15 but depends on
> locale) it is the Julian calendar. Internally stored is the date serial
> number as day offset from the null-date, usually 1899-12-30 in LibreOffice.
> Calculations use the proleptic Gregorian calendar, as well as document
> storage.

Well, ok ... but... If I've been taught that America was discover on October
12th, 1472, what calendar was using my teacher? I don't know, but I expect that
if write 1472-10-12 (or 12/10/1472) it remains the same in Calc, in Writer, in
Base and in whatever place it was used. And I don't expect the system adapt my
date to a different calendar when I move the date from one component to other
(regardless of the calendar used by me or configured in the application).

Any case, I think there is a bug when 0001-01-01 and 0001-01-02 are converted
to a different date but 0001-01-03 is not converted

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #10 from Eike Rathke  ---
(In reply to jcsanz from comment #0)
> 13. In the Field Format dialog box, in the Category list, select Date,
> and in the Format list, select 31/12/1999. Click the OK button. This will
> display the date in the same format as on the original Calc sheet.
That of course depends on the current locale and everyone will see something
different with the default date format, i.e. in an en-CA locale the default
format is -MM-DD

Now to the symptom: registering the Calc sheet as database and displaying that
converts content to a database view using formatted fields, with some
back-and-forth conversion (serial date number offset from the null-date to date
and back) involved that apparently has bugs with at least negative proleptic
Gregorian dates.


(In reply to jcsanz from comment #8)
> The first date is one day before 0001-01-01 (using
> Gregorian proleptic calendar) and is a date that exists (this is 0001-01-01
> BC).
Actually 0001-12-31 BCE ...


(In reply to jcsanz from comment #9)
> Maybe LibreOffice is trying to adapt dates to a specific calendar. But does
> LibreOffice know which calendar I am using when I type the date?
Input happens in the locale's default calendar, usually Gregorian, but for
dates before the Gregorian cut-off date (common is 1582-10-15 but depends on
locale) it is the Julian calendar. Internally stored is the date serial number
as day offset from the null-date, usually 1899-12-30 in LibreOffice.
Calculations use the proleptic Gregorian calendar, as well as document storage.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #9 from jcs...@libreoffice.org ---
(In reply to Alex Thurgood from comment #7)
> @Eike : thoughts ?

I think that every date written in some place should be the same in whatever
other place, without any modification or adaptation. If I write a date, I
expect that date remain unchanged.

Maybe LibreOffice is trying to adapt dates to a specific calendar. But does
LibreOffice know which calendar I am using when I type the date?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #8 from jcs...@libreoffice.org ---
(In reply to Alex Thurgood from comment #5)
> I can confirm what you see, but isn't the first lines of date data in your
> Calc sheet an invalid date anyway ?

I don't think so. The first date is one day before 0001-01-01 (using Gregorian
proleptic calendar) and is a date that exists (this is 0001-01-01 BC).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

Alex Thurgood  changed:

   What|Removed |Added

 CC||er...@redhat.com,
   ||ipla...@tuta.io

--- Comment #7 from Alex Thurgood  ---
@Eike : thoughts ?

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #6 from Alex Thurgood  ---
Created attachment 183689
  --> https://bugs.documentfoundation.org/attachment.cgi?id=183689=edit
Screenshot comparing date display in Calc and Writer

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-21 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #5 from Alex Thurgood  ---
I can confirm what you see, but isn't the first lines of date data in your Calc
sheet an invalid date anyway ?


Attaching screenshot of what I see with

Version: 7.3.7.2 / LibreOffice Community
Build ID: e114eadc50a9ff8d8c8a0567d6da8f454beeb84f
CPU threads: 8; OS: Mac OS X 13.0; UI render: default; VCL: osx
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Calc: threaded


from the Apple AppStore (Arm Silicon M1).

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

m.a.riosv  changed:

   What|Removed |Added

 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

m.a.riosv  changed:

   What|Removed |Added

 CC||miguelangelrv@libreoffice.o
   ||rg

--- Comment #4 from m.a.riosv  ---
Created attachment 183677
  --> https://bugs.documentfoundation.org/attachment.cgi?id=183677=edit
Sample with range dates

Seems it happens with dates before 03/01/0001.
Version: 7.5.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a81e957f5026373f3935390c786c21416fc74fcc
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US Calc: CL threaded

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #3 from jcs...@libreoffice.org ---
Sorry, the last comment is not to this bug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #2 from jcs...@libreoffice.org ---
I have done the same test in a MariaDB database with a Direct connection and
the results obtained are exactly the same but in MariaDB the record with ID = 3
has been imported, but the date showed in the table view is "03/01/0001" and
the date actually stored is 31/12/. Note that the las date is not a valid
date in Firebird, so it couldn't be imported in that database.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

jcs...@libreoffice.org changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=15
   ||2118

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 152114] Dates imported erroneously from Calc to Writer database fields

2022-11-18 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=152114

--- Comment #1 from jcs...@libreoffice.org ---
Created attachment 183672
  --> https://bugs.documentfoundation.org/attachment.cgi?id=183672=edit
Calc file with the dates used to test

-- 
You are receiving this mail because:
You are the assignee for the bug.