Bug 393081 - PO-Revision-Date timezone offset doesn't account for DST
Summary: PO-Revision-Date timezone offset doesn't account for DST
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (show other bugs)
Version: 2.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-13 02:31 UTC by Egor Vladimirovich
Modified: 2018-08-13 01:01 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Egor Vladimirovich 2018-04-13 02:31:43 UTC
When saving a .po file, Lokalize writes current time into the PO-Revision-Date header field. The time itself is correct, but the timezone is wrong for DST timezones.

Steps to Reproduce:
1) make sure you're in a DST timezone (in my case it's EEST +0300)
2) save a .po file

Actual Results:
"PO-Revision-Date: 2018-04-13 05:01+0200\n"

Expected Results:
"PO-Revision-Date: 2018-04-13 05:01+0300\n"

Lokalize version: 2.0
Archlinux package version: lokalize 17.12.3-1

Additional Information:
This is not a system configuration problem. timedatectl displays EEST +0300. git uses the correct timezone offset when saving commits.
Comment 1 Simon Depiets 2018-08-10 08:50:16 UTC
Confirmed
Comment 2 Simon Depiets 2018-08-10 09:45:24 UTC
Bugfix suggested
https://phabricator.kde.org/D14721
Comment 3 Simon Depiets 2018-08-13 01:01:57 UTC
Git commit e7fdea7a5c8783ac2eadd244c09ee0534653efb6 by Simon Depiets.
Committed on 13/08/2018 at 01:01.
Pushed by sdepiets into branch 'master'.

Take into account summer time for the date offset in PO-Revision-Date

Summary:
Using the offsetFromUtc is more straightforward and accurate

Reviewers: #localization, aacid, mlaurent, ltoscano, shaforostoff

Reviewed By: #localization, aacid

Tags: #localization

Differential Revision: https://phabricator.kde.org/D14721

M  +5    -4    src/catalog/gettextheader.cpp

https://commits.kde.org/lokalize/e7fdea7a5c8783ac2eadd244c09ee0534653efb6