Bug 168347 - Data to Text: insert as text adds 2 days to date columns
Summary: Data to Text: insert as text adds 2 days to date columns
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.2.0 target:25.8.2
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-10 11:52 UTC by Mike Kaganski
Modified: 2025-09-11 07:23 UTC (History)
0 users

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 Mike Kaganski 2025-09-10 11:52:11 UTC
This is one of three related issues in Data to Text feature, all caused by commit 5b808448dc79e996efa7cb5082145d4e5803daa6, similar to bug 168252 - but all use different code paths, so I split them, to allow test each separately.

1. Register a database using a spreadsheet (ODS) with a date column.
2. Create a text document.
3. View -> Data Sources; expand the ODS datasource, and select its table with the data column.
4. Select a row in the right-hand table in the datasources panel
5. Click [Data to Text] button on the panel's toolbar.
6. Select "Text" at the top; select the date column name in the Database columns list, and press [ > ] button, then press [OK].

=> the inserted text is +2 days.
Comment 1 Mike Kaganski 2025-09-10 12:19:24 UTC
https://gerrit.libreoffice.org/c/core/+/190756
Comment 2 Mike Kaganski 2025-09-10 12:24:25 UTC
See also:
commit b113270e72425f8896d56dabc8ef1a3f4451624b
commit 61e0b5ae842c388edd8c10a16190cc2823c011b6
Comment 3 Commit Notification 2025-09-10 17:42:16 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

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

tdf#168347: fix "standard" date in SwInsertDBColAutoPilot::DataToDoc (1)

It will be available in 26.2.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 4 Commit Notification 2025-09-11 07:23:31 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/40f481b9c4d3cdcb5621002064ac89578ed6dece

tdf#168347: fix "standard" date in SwInsertDBColAutoPilot::DataToDoc (1)

It will be available in 25.8.2.

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.