Bug 455579 - X offset of 2 hours after reopening an saved project file
Summary: X offset of 2 hours after reopening an saved project file
Status: RESOLVED FIXED
Alias: None
Product: LabPlot2
Classification: Applications
Component: general (show other bugs)
Version: 2.9.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Stefan Gerlach
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-06-19 03:05 UTC by tanjatroescher
Modified: 2022-10-02 21:37 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
X_offset_of_2_hours_after_reopening_the_project (241.85 KB, image/png)
2022-06-19 03:05 UTC, tanjatroescher
Details
Text_file_with_data_points_to_import (106 bytes, text/plain)
2022-06-19 03:05 UTC, tanjatroescher
Details
Importing_data (63.14 KB, image/png)
2022-06-19 03:06 UTC, tanjatroescher
Details
New_project_shows_correct_xy_graph (264.99 KB, image/png)
2022-06-19 03:07 UTC, tanjatroescher
Details
Version Jul 10 2022, 22:26:15 (136.75 KB, image/png)
2022-07-11 16:19 UTC, tanjatroescher
Details
Fresh imported data has offset in xy graph (215.55 KB, image/png)
2022-07-11 16:20 UTC, tanjatroescher
Details
After saving as project, closing and reopening the offset in xy graph is gone (127.07 KB, image/png)
2022-07-11 16:21 UTC, tanjatroescher
Details
Changing the value of a time data point by hand generates an offset again (148.22 KB, image/png)
2022-07-11 16:22 UTC, tanjatroescher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tanjatroescher 2022-06-19 03:05:17 UTC
Created attachment 149917 [details]
X_offset_of_2_hours_after_reopening_the_project

Hi,
when I save my LabPlot project and reopen it, my data points in the xy graph has an offset of 2 hours.
See screenshots in the attachments.

Kind Regards from Germany
Tanja
Comment 1 tanjatroescher 2022-06-19 03:05:57 UTC
Created attachment 149918 [details]
Text_file_with_data_points_to_import
Comment 2 tanjatroescher 2022-06-19 03:06:51 UTC
Created attachment 149919 [details]
Importing_data
Comment 3 tanjatroescher 2022-06-19 03:07:48 UTC
Created attachment 149920 [details]
New_project_shows_correct_xy_graph
Comment 4 Stefan Gerlach 2022-07-09 09:31:47 UTC
I could reproduce the problem. Also the custom number of ticks is not restored. I work on fixing this.
Comment 5 Stefan Gerlach 2022-07-10 22:05:58 UTC
Git commit 0d2494a924fa35b4d471052f8c97e2d26e2a12fc by Stefan Gerlach.
Committed on 10/07/2022 at 22:03.
Pushed by sgerlach into branch 'master'.

Consistently use date time in UTC to avoid confusion with locale date time settings

M  +4    -4    src/backend/lib/Range.h
M  +5    -2    src/backend/worksheet/plots/cartesian/Axis.cpp
M  +14   -14   src/backend/worksheet/plots/cartesian/CartesianPlot.cpp
M  +5    -0    src/backend/worksheet/plots/cartesian/XYCurve.cpp
M  +20   -16   src/kdefrontend/dockwidgets/CartesianPlotDock.cpp

https://invent.kde.org/education/labplot/commit/0d2494a924fa35b4d471052f8c97e2d26e2a12fc
Comment 6 Stefan Gerlach 2022-07-10 22:27:12 UTC
The fix is also in flatpak via patch.
Comment 7 tanjatroescher 2022-07-11 16:19:20 UTC
Created attachment 150536 [details]
Version Jul 10 2022, 22:26:15
Comment 8 tanjatroescher 2022-07-11 16:20:08 UTC
Created attachment 150537 [details]
Fresh imported data has offset in xy graph
Comment 9 tanjatroescher 2022-07-11 16:21:11 UTC
Created attachment 150538 [details]
After saving as project, closing and reopening the offset in xy graph is gone
Comment 10 tanjatroescher 2022-07-11 16:22:22 UTC
Created attachment 150539 [details]
Changing the value of a time data point by hand generates an offset again
Comment 11 tanjatroescher 2022-07-11 16:37:50 UTC
Hi Stefan,

again many THANKS for your help.
With your update the loaded project shows now a correct xy graph.

But now the offset exists for fresh imported data, or when a time value will be changed.

I added some screenshots:

"Version Jul 10 2022, 22:26:15"
Shows the version I tested

"Fresh imported data has offset in xy graph"
Shows a generated graph from fresh imported data into the table. The generated graph has an offset of -2 hours.

"After saving as project, closing and reopening the offset in xy graph is gone"
After saving the table with fresh imported data and the xy graph with -2 hour offset as project, closing LabPlot2, reopening it and loading the saved project, everything is correct.

" Changing the value of a time data point by hand generates an offset again"
But changing the first time value from "19.06.2022 00:00" to "19.06.2022 00:01" generates for that data point an -2 hour offset again.

Many Thanks
Tanja
Comment 12 Stefan Gerlach 2022-10-02 21:37:30 UTC
Hi Tanja,

the two problems (import date time data and editing date time) are now fixed (master, next flatpak and appimage). Please let me know if there are any other issues.

best,
Stefan