Bug 74869 - EDITING: Text import does not recognize some dates in YMD-format, depending on timezone
Summary: EDITING: Text import does not recognize some dates in YMD-format, depending o...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.4.5 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 75404 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-02-12 03:36 UTC by Ilya Melnikov
Modified: 2019-01-18 11:33 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot (5.81 KB, image/png)
2014-02-12 03:36 UTC, Ilya Melnikov
Details
Screencast (1.73 MB, video/mp4)
2014-02-13 01:00 UTC, Ilya Melnikov
Details
Screenshot_2 (537.41 KB, image/png)
2014-02-13 01:41 UTC, Ilya Melnikov
Details
Screenshot_3 (647.92 KB, image/png)
2014-02-16 05:35 UTC, Ilya Melnikov
Details
Sample file to test (29.18 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-05-24 13:55 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Melnikov 2014-02-12 03:36:03 UTC
Text import does not recognize some dates in YMD-format.

Steps to reproduce:
* open Calc
* enter some dates in YMD-format into first column
* select these cells
* copy this cells to clipboard
* move cursor to new cell
* press "Paste as Unformatted text" - this will open "Text import" window
* select for column type: "Date (YMD)"
* press "Ok" for start Import
As result - some dates are not recognized on import.

For example:
First (source column)   Pasted column
1983-04-01              1983-04-01   <- was not recognized
1983-04-02              04/02/83
1983-05-01              05/01/83
1984-04-01              1984-04-01   <- was not recognized

Reproducing: always
Version checked: 3.5.7.2, 4.1.1.2
Comment 1 Ilya Melnikov 2014-02-12 03:36:50 UTC
Created attachment 93897 [details]
screenshot
Comment 2 m_a_riosv 2014-02-13 00:23:10 UTC
Hi Ilya, thanks for reporting.

I can't reproduce with any version including 3.5.7.2.

Can you attach an "import window" screenshot or detail which are all the options?
Comment 3 Ilya Melnikov 2014-02-13 01:00:02 UTC
Created attachment 93983 [details]
Screencast
Comment 4 Ilya Melnikov 2014-02-13 01:03:16 UTC
(In reply to comment #2)
> I can't reproduce with any version including 3.5.7.2.
This bug appears only on certain dates. I found only "YYYY-04-01". Does these values works normal in your case?

> Can you attach an "import window" screenshot or detail which are all the
> options?
Done.
Comment 5 m_a_riosv 2014-02-13 01:23:19 UTC
With exactly your same options, works fine for me.

Please try resetting the user profile, sometimes solves strange issues.
https://wiki.documentfoundation.org/UserProfile

If it doesn't work try changing your locale in Menu/Tools/Options/Language settings/Languages.
Comment 6 Ilya Melnikov 2014-02-13 01:41:50 UTC
Created attachment 93984 [details]
Screenshot_2
Comment 7 Ilya Melnikov 2014-02-13 01:44:24 UTC
(In reply to comment #5)
> Please try resetting the user profile, sometimes solves strange issues.
> https://wiki.documentfoundation.org/UserProfile
Tried on 4 clean virtual machines. LO configs were clean. (see Screenshot_2)

> try changing your locale in Menu/Tools/Options/Language
> settings/Languages.
Tried - no luck. What can I try else?
Comment 8 m_a_riosv 2014-02-13 01:48:00 UTC
Really I don't know.
Try changing the Character set and the Language in the import window.
Comment 9 Ilya Melnikov 2014-02-13 02:35:46 UTC
> Try changing the Character set and the Language in the import window.
Did not help.

Can it be because of my operating systems are in Russian locale but yours not?

Additionally, I checked all dates (using autofill) from 0100-01-01 to 3000-01-01. Bug appears only on four dates:
1984-04-01
1983-04-01
1982-04-01
1981-04-01
Comment 10 m_a_riosv 2014-02-16 01:11:33 UTC
And marking the option for Detect special numbers?
Comment 11 Ilya Melnikov 2014-02-16 03:14:54 UTC
(In reply to comment #10)
> And marking the option for Detect special numbers?
Did not help too.
I tried to change many different options in "Text Import" dialog. May be I need some special combination of these options? But this does not answer the question why bug is reproduced on my machines only.

I have tens of virtual machines used for building projects on different Linux distribution. These VMs has almost default configuration. In comparison to default installation it just has few additional packages (mc, screen) and root-password. After all actions (build or test something) with VM I "reset" it back to "just-installed state". So these VMs are fully clean. There are no custom options.

And this bug is reproducing on these VMs. (see Screenshot_2)
Comment 12 m_a_riosv 2014-02-16 03:20:53 UTC
Please take a look:
http://erack.org/blog/archives/archives/8-LibreOffice-date-acceptance-patterns.html
maybe some help can be found there.
Comment 13 Ilya Melnikov 2014-02-16 05:35:56 UTC
Created attachment 94143 [details]
Screenshot_3
Comment 14 Ilya Melnikov 2014-02-16 05:39:55 UTC
Just installed 3 VMs, in 3 locales: en, de, ru. Absolutely default installation. No options changed. Bug is still persists (see Screenshot_3).

(In reply to comment #5)
> With exactly your same options, works fine for me.
mariosv, please tell - what distribution, version, arch and locale do you use?
Comment 15 Ilya Melnikov 2014-02-16 06:01:27 UTC
Found possible reason!

When I set timezone to London (GMT+0) - bug is not reproducing.
When I set timezone to my local (Russia, Yekaterinburg, GMT+6) or to Moscow (Russia, GMT+4) - bug is reproducing.
Comment 16 m_a_riosv 2014-02-16 14:10:32 UTC
Hi Ilya, really a good job, thanks.

my system hour: (UTC+01:00) Bruselas, Copenhague, Madrid, París

Reproducible changing the system hour to:
(UTC+04:00) Moscú, S. Petersburgo, Volgogrado
Window7x64Ultimate
Version: 4.2.1.1 Build ID: d7dbbd7842e6a58b0f521599204e827654e1fb8b

Change the status to NEW.
Comment 17 m_a_riosv 2014-03-04 20:26:39 UTC
*** Bug 75404 has been marked as a duplicate of this bug. ***
Comment 18 m_a_riosv 2014-05-24 13:55:04 UTC
Created attachment 99705 [details]
Sample file to test

Still reproducible for

UTC+04:00 Moscú, S. Petersburgo, Volgogrado
UTC+02:00 Helsinki, Kiev, Riika, Tallinna, Vilna

with:
LibreOffice 3.4.5 OOO340m1 (Build:502)
Version: 4.2.5.0.0+ Build ID: f3ca9cc78e77dda656b5c39be928fdbb7f8babe8
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-05-23_03:10:34
Versión: 4.3.0.0.beta1 Id. compilación: 2e39c7e59c8fc8b16a54c3d981dceef27fb0c07f
Version: 4.4.0.0.alpha0+ Build ID: e76dc5b422084f68cc4b27eea4cdbef3d3e7a1a9
   TinderBox: Win-x86@39, Branch:master, Time: 2014-05-23_13:15:55

Last working for me:
LibreOffice 3.3.4 OOO330m19 (Build:401)tag libreoffice-3.3.4.1

The same issue opening from CSV (saving the test file as csv), selecting different character set doesn't solve the issue.
Comment 19 m_a_riosv 2014-05-24 13:55:58 UTC
Change the version to the first where I can find the bug.
Set up as regression.
Comment 20 Isamu Mogi 2014-06-06 11:39:38 UTC
*** Bug 79663 has been marked as a duplicate of this bug. ***
Comment 21 Isamu Mogi 2014-06-06 12:16:21 UTC
On LibreOffice 4.2.4.2 OpenSUSE Linux 13.1 x64 following combination reproduces this bug:

+ ------------------------+------------+
| TZ environment variable | Input date |
+ ------------------------+------------+
| America/Montevideo      | 1974-12-22 |
| Asia/Colombo            | 1942-09-01 |
| Atlantic/Azores         | 1942-04-25 |
| Atlantic/Azores         | 1943-04-17 |
| Atlantic/Azores         | 1944-04-22 |
| Atlantic/Azores         | 1945-04-21 |
| Atlantic/Madeira        | 1942-04-25 |
| Atlantic/Madeira        | 1943-04-17 |
| Atlantic/Madeira        | 1944-04-22 |
| Atlantic/Madeira        | 1945-04-21 |
| Europe/Gibraltar        | 1941-05-04 |
| Europe/Gibraltar        | 1942-04-05 |
| Europe/Gibraltar        | 1943-04-04 |
| Europe/Gibraltar        | 1944-04-02 |
| Europe/Gibraltar        | 1945-04-02 |
| Europe/Gibraltar        | 1947-04-13 |
| Europe/Madrid           | 1942-05-02 |
| Europe/Madrid           | 1943-04-17 |
| Europe/Madrid           | 1944-04-15 |
| Europe/Madrid           | 1945-04-14 |
| Europe/Madrid           | 1946-04-13 |
| Europe/Monaco           | 1941-05-05 |
| Europe/Monaco           | 1942-03-09 |
| Europe/Monaco           | 1943-03-29 |
| Europe/Monaco           | 1944-04-03 |
| Europe/Monaco           | 1945-04-02 |
| Europe/Moscow           | 1919-05-31 |
| Europe/Paris            | 1945-04-02 |
| Pacific/Apia            | 2011-12-30 |
| Pacific/Enderbury       | 1995-01-01 |
| Pacific/Fakaofo         | 2011-12-30 |
| Pacific/Kiritimati      | 1995-01-01 |
| Pacific/Kwajalein       | 1993-08-20 |
+ ------------------------+------------+

I think Bug 63230 is closely related to this bug because 
the patch uploaded by Bug 63230 Comment 9 also fixes this bug.
Comment 22 Isamu Mogi 2014-06-06 12:44:43 UTC
Oops sorry, my bad, Comment 21 is incorrect. Please ignore it.
Comment 23 Eike Rathke 2015-02-19 16:05:52 UTC
Should be fixed with bug 63230, please verify.

*** This bug has been marked as a duplicate of bug 63230 ***
Comment 24 Ilya Melnikov 2017-12-03 14:52:58 UTC
Again.

LibreOffice 5.3.7~rc2-0ubuntu0.16.04.1~lo0

Ubuntu 16.04 amd64

LibreOffice installed from PPA.
Comment 25 QA Administrators 2019-01-18 03:59:10 UTC Comment hidden (obsolete)
Comment 26 Eike Rathke 2019-01-18 11:32:58 UTC
Does not occur with recent 6.x releases and TZ=Europe/Moscow