Dates changing (was: Input date)

Discuss the spreadsheet application
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Dates changing (was: Input date)

Post by acknak »

I get different results opening the files with AOO 3.4.1. The first two files give the same result (same as your middle example, 1899-OK). The third file gives the same result as your third sample.

I'm not sure I understand what the files are trying to show, but then the date conversions confuse me no end.

The base date gets applied on entry and then again on display, right? The weird thing is that the dates are stored in the ODF file as a human-readable ISO8601 date string, so the base date gets used again on writing the file and again on reading.

I played with this once, changing the base date while I was working on a file and it all seemed to work correctly--I just couldn't wrap my head around all the back-and-forth conversions.
AOO4/LO5 • Linux • Fedora 23
eremmel
Posts: 1080
Joined: Tue Dec 30, 2008 1:15 am

Re: Dates changing (was: Input date)

Post by eremmel »

Just tested AOO 3.4.1 Windows (W7) and OOO 3.3.0 WinXP; both showx the issue: first document shows wrong dates. (Is it possible that linux-builds are OK?)
Last edited by eremmel on Mon Jan 28, 2013 6:52 pm, edited 2 times in total.
It's Microsoft marketing that tells you computers are qualified for non-technicians
W11 22H2 (build 22621), LO 7.4.2.3(x64)
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Dates changing (was: Input date)

Post by acknak »

I can't imagine that anything about the date conversions should be system-dependent, but I suppose anything is possible.

Here's what I see:
Attachments
calc_base_dates.png
AOO4/LO5 • Linux • Fedora 23
User avatar
Hagar Delest
Moderator
Posts: 33595
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Dates changing (was: Input date)

Post by Hagar Delest »

Here is what I've on Ubuntu 12.10 with AOO 3.4.1:
Dates.png
Dates.png (24.06 KiB) Viewed 2686 times
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 24.8 portable on Windows 11.
User avatar
Villeroy
Volunteer
Posts: 31361
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dates changing (was: Input date)

Post by Villeroy »

For some reason I do not understand, I suffer from the same problem by now.

The attached csv file always loads with null-date 1904-01-01 imported with Windows-1252 encoding, German locale, semicolon as field delimiter, no text delimiter and "special numbers" option.
Then I get the 1462 offset whenever I copy cells from this file to a regular ODS spreadsheet (based on 1899-12-30). This is no problem with Base (HSQL) which treats the sheet dates as true date values.
Why does that file load with a non-standard null-date? Plain text does not include any spreadsheet specific settings. I use to import very similar bank account files since years without stumbling upon this problem.

The problem must be within my profile. The file loads with 1899-12-30 dates when I open the same file as another user.
Attachments
20130415.csv.zip
REMOVE the .zip suffix from this _uncompressed_ text file.
(391 Bytes) Downloaded 94 times
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 35191
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Dates changing (was: Input date)

Post by RoryOF »

The dates are showing as 15/04/13 (today) when I load, Villeroy. It must be a profile problem.
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
User avatar
Villeroy
Volunteer
Posts: 31361
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dates changing (was: Input date)

Post by Villeroy »

RoryOF wrote:The dates are showing as 15/04/13 (today) when I load, Villeroy. It must be a profile problem.
Yes, in any case the correct date 15/04/13 is shown but the cell value in C2 and C3 is 39917 when Tools>Options>Calc>Calculation>Date is set to 1904-01-01. The date setting should be 1899-12-30 with cell value 41379. When you copy a date into a document with another null-date setting you get a date offset because the actual cell value is different.
I copy the 2 records with 15/04/13 (39917) into a regular Calc document and get 14/04/09.

Meanwhile I found registrymodifications.xcu being the culprit. When I reset this file only, CSV imports with default 1899-12-30 and the problem is gone.
More precisely:

Code: Select all

<item oor:path="/org.openoffice.Office.Calc/Calculate/Other/Date">
<prop oor:name="DD" oor:op="fuse"><value>1</value></prop>
</item><item oor:path="/org.openoffice.Office.Calc/Calculate/Other/Date">
<prop oor:name="MM" oor:op="fuse"><value>1</value></prop></item>
<item oor:path="/org.openoffice.Office.Calc/Calculate/Other/Date"><prop oor:name="YY" oor:op="fuse"><value>1904</value></prop></item>
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Dates changing (was: Input date)

Post by acknak »

Villeroy wrote:
RoryOF wrote:... It must be a profile problem.
... Meanwhile I found registrymodifications.xcu being the culprit. ...
Why am I not surprised? I can't believe how many problems the profile causes.

Anyway, good catch! Maybe this will help get the problem fixed.

Do you have any idea how the setting got changed? Is this another "spontaneous mutation"?
AOO4/LO5 • Linux • Fedora 23
User avatar
Villeroy
Volunteer
Posts: 31361
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dates changing (was: Input date)

Post by Villeroy »

My backup indicates that the bad change happened between the 9th and 10th of this month. Now I have to compare the 2 backup versions of my profile. This may take some time.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
Villeroy
Volunteer
Posts: 31361
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Dates changing (was: Input date)

Post by Villeroy »

Apart from this, some binary temp files and registrymodification.xcu seem to be the only files that changed between the 2 backups.

I can not diff the registrymodification because most of it is in a single very long line.

Why does the presenter extension (./user/extensions/bundled/present*) modify its files every day? I never use that extension. This is scary.
This is the profile of 9th Apr. The files with time stamp "Apr 9" change every day.

Code: Select all

.openoffice.org/3/user_20130409$ ls -l extensions/bundled/present*
extensions/bundled/presentation-minimizer.oxt:
insgesamt 412
drwxr-xr-x 2 andreas andreas   4096 Apr  9 10:15 bitmaps
-r--r--r-- 1 andreas andreas   3944 Aug 13  2012 description.xml
drwxr-xr-x 2 andreas andreas   4096 Apr  9 10:15 help
drwxr-xr-x 2 andreas andreas   4096 Apr  9 10:15 META-INF
drwxr-xr-x 2 andreas andreas   4096 Apr  9 10:15 registration
drwxr-xr-x 4 andreas andreas   4096 Okt 27 19:21 registry
-r--r--r-- 1 andreas andreas 396608 Aug 13  2012 SunPresentationMinimizer.uno.so

extensions/bundled/presenter-screen.oxt:
insgesamt 1268
drwxr-xr-x  2 andreas andreas    4096 Apr  9 10:15 bitmaps
-r--r--r--  1 andreas andreas    3749 Aug 13  2012 description.xml
drwxr-xr-x 22 andreas andreas    4096 Apr  9 10:15 help
drwxr-xr-x  2 andreas andreas    4096 Apr  9 10:15 META-INF
-r--r--r--  1 andreas andreas 1272424 Aug 13  2012 PresenterScreen.uno.so
drwxrwxr-x  2 andreas andreas    4096 Apr  9 10:15 registration
drwxr-xr-x  4 andreas andreas    4096 Okt 27 19:21 registry
 Edit: A closer look reveals that the subdirectories are touched on every startup so the subdirectories get new time stamps but not the files therein. 
Last edited by Villeroy on Tue Apr 16, 2013 11:35 am, edited 3 times in total.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
User avatar
RoryOF
Moderator
Posts: 35191
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Dates changing (was: Input date)

Post by RoryOF »

Not on my system, Villeroy, using AOO 3.4.1 (Presenter screen)
Apache OpenOffice 4.1.16 on Xubuntu 24.04.4 LTS
Locked