Bug 143008 - Text to Columns converts type date with AM/PM time wrongly
Summary: Text to Columns converts type date with AM/PM time wrongly
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Eike Rathke
URL:
Whiteboard: target:7.3.0 target:7.2.0.0.beta2 tar...
Keywords:
Depends on:
Blocks:
 
Reported: 2021-06-23 14:12 UTC by Antonio
Modified: 2021-07-12 19:00 UTC (History)
1 user (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 Antonio 2021-06-23 14:12:54 UTC
Description:
I have a cell with the following text "22/06/2021 10:02 PM" and applying the Data > Text to Columns command with the type DATE(DMY) it converts to "22-06-2021 10:02" instead to the correct value "22-06-2021 22:02"


Steps to Reproduce:
1. Select a cell with text value "22/06/2021 10:02 PM"
2. Apply the command "Data > Text to Columns" 
3. Select  the columns and chose column type DATE(DMY)
4. Press OK

Actual Results:
22-06-2021 10:02

Expected Results:
22-06-2021 22:02


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Mac OS X (All)
OS is 64bit: no
Comment 1 Eike Rathke 2021-06-23 15:29:02 UTC
Confirmed. Apparently has ever been the case since OOo.
Comment 2 Commit Notification 2021-06-23 18:30:57 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d81775f5b12080676ebaf659c5a4c10d64a9074b

Resolves: tdf#143008 Evaluate AM/PM for type date+time text-to-column and CSV

It will be available in 7.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Eike Rathke 2021-06-23 18:32:42 UTC
Pending review
https://gerrit.libreoffice.org/c/core/+/117719 for 7-2
https://gerrit.libreoffice.org/c/core/+/117720 for 7-1
Comment 4 Commit Notification 2021-06-23 19:27:32 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-2":

https://git.libreoffice.org/core/commit/4b6c1190f0cde3bc74925bcfa644f24101c6c98f

Resolves: tdf#143008 Evaluate AM/PM for type date+time text-to-column and CSV

It will be available in 7.2.0.0.beta2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 5 Commit Notification 2021-06-24 08:57:20 UTC
Eike Rathke committed a patch related to this issue.
It has been pushed to "libreoffice-7-1":

https://git.libreoffice.org/core/commit/62f01b4c91d402e1828f8ad6b007d0a3594d2d3e

Resolves: tdf#143008 Evaluate AM/PM for type date+time text-to-column and CSV

It will be available in 7.1.5.

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

Affected users are encouraged to test the fix and report feedback.
Comment 6 Commit Notification 2021-07-09 14:13:54 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/162c5c343db475d9fc930c17b3d62a84925878b3

tdf#143008: sc: Add UItest

It will be available in 7.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 7 BogdanB 2021-07-12 19:00:07 UTC
Thanks for solving this bug.

It's ok now (22.06.21 22:02). Verified in
Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: 61618141f0204ce6653354f6424e11276d939aed
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded