Bug 100046 - DATEVAL Function (DATEVALUE)
Summary: DATEVAL Function (DATEVALUE)
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.3.2 release
Hardware: x86-64 (AMD64) Linux (All)
: high major
Assignee: Eike Rathke
URL:
Whiteboard: target:5.3.0 target:5.2.1
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-25 09:15 UTC by paul.noel1
Modified: 2016-10-25 18:38 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description paul.noel1 2016-05-25 09:15:07 UTC
with French regional settings the function DATEVAL("02.04.1945") gives an error: 502 instead of code 16529
OK for the other dates
Comment 1 GerardF 2016-05-25 09:52:52 UTC
Same as bug 79663, but this one (dup of 63230) is tagged fixed in 4.5.
It seems that he cames back.
Reproducible also with 5.0.6
Comment 2 Julien Nabet 2016-05-27 08:08:37 UTC
So let's put regression here.
Comment 3 Caolán McNamara 2016-07-26 15:45:21 UTC
=DATEVALUE("01.04.1945") gives 16528
=DATEVALUE("02.04.1945") fails with Err:502
=DATEVALUE("03.04.1945") gives 16530
Comment 4 Eike Rathke 2016-07-26 16:56:04 UTC
Investigating.
Comment 5 Eike Rathke 2016-07-26 17:42:34 UTC
Actually any of "01.04.1945" or "02.04.1945" or "03.04.1945" is an invalid date input in a French fr-FR locale and consistently I get Err:502 for all three function calls, not only for "02.04.1945". fr-Fr date pattern is M/D/Y

However, it does work if under Tools - Options - Language Settings - Languages the "Date acceptance pattern" includes D.M.Y and with that I get 16528, 16529 and 16530.

Note that using the ISO 8601 notation works in all locales, =DATEVALUE("1945-04-02")

BUT, with TZ=Europe/Paris that one results in error.

Not a regression though because the date input as of bug 79663 still works. Likely DATEVALUE("1945-04-02") never worked with TZ=Europe/Paris but has a similar cause.
Comment 6 Eike Rathke 2016-07-26 17:45:34 UTC
(In reply to Eike Rathke from comment #5)
> Not a regression though because the date input as of bug 79663 still works.
> Likely DATEVALUE("1945-04-02") never worked with TZ=Europe/Paris but has a
> similar cause.

Darn, or maybe not. Date input results in string instead of date serial number.
Comment 7 Eike Rathke 2016-07-26 19:01:11 UTC
Great fun.. on 1945-04-02 02:00:00 Paris entered a Double DST – Clocks were turned ahead another hour when DST was already in force (2 hours ahead of standard time). Single DST of 1944 actually was never ended. See
https://www.timeanddate.com/time/change/france/paris?year=1945
https://www.timeanddate.com/time/change/france/paris?year=1944

Likely this confuses the "set 1945-04-02 00:00:00 and if the result differs resubmit corrected by the reported timezone and DST values" approach.
Comment 8 Commit Notification 2016-07-26 20:15:38 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=22dceea0ca3cd68463e390395aa8de479b680240

add test data from tdf#79663, tdf#100046 related

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2016-07-26 21:21:35 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8e91b0177cbf6554acf7ccfbcc573f647e7fcf4d

Resolves: tdf#100046 the dreaded 1945-04-02 Double DST, also tdf#79663

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2016-07-26 21:21:46 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=157b56a049a9a5f868d1f3b9856a631a40043a14

activate the remaining 1945-04-02 test cases, tdf#100046

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Eike Rathke 2016-07-26 22:09:17 UTC
Pending review https://gerrit.libreoffice.org/27559 for 5-2
Comment 12 Commit Notification 2016-07-27 10:54:51 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-5-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8ae23d952433fbc07cb13364619d316f15bbac92&h=libreoffice-5-2

Resolves: tdf#100046 the dreaded 1945-04-02 Double DST, also tdf#79663

It will be available in 5.2.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.