Skip to content

Comments

Parse unknown timezones as UTC#1047

Merged
adrianschroeter merged 1 commit intoopenSUSE:masterfrom
bmwiedemann:changelog2spec
Jan 7, 2025
Merged

Parse unknown timezones as UTC#1047
adrianschroeter merged 1 commit intoopenSUSE:masterfrom
bmwiedemann:changelog2spec

Conversation

@bmwiedemann
Copy link
Member

Without this change, parsing changelog entries such as Tue Mar 28 07:25:39 WEST 2017 - someone@suse (from yast2.changes)

would produce a Mar 27 date in the .spec file, because

TZ=CET perl -e 'use Date::Parse; print str2time("28 Mar 2017")'
1490652000

considers the local timezone and maps to

date -d @1490652000 -u -Iseconds
2017-03-27T22:00:00+00:00

This patch was done while working on reproducible builds for openSUSE.

Without this change, parsing changelog entries such as
Tue Mar 28 07:25:39 WEST 2017 - someone@suse

would produce a Mar 27 date in the .spec file, because

TZ=CET perl -e 'use Date::Parse; print str2time("28 Mar 2017")'
1490652000

considers the local timezone and maps to

date -d @1490652000 -u -Iseconds
2017-03-27T22:00:00+00:00

This patch was done while working on reproducible builds for openSUSE.
@adrianschroeter adrianschroeter merged commit fd54fad into openSUSE:master Jan 7, 2025
1 check passed
@bmwiedemann bmwiedemann deleted the changelog2spec branch January 21, 2025 08:41
bmwiedemann added a commit to bmwiedemann/obs-service-source_validator that referenced this pull request May 13, 2025
bmwiedemann added a commit to bmwiedemann/obs-build that referenced this pull request Sep 10, 2025
for catching openSUSE#1099 and openSUSE#1047
and other weirdness, such as that the first entry is parsed differently.
Might need adaption for code fixes.
bmwiedemann added a commit to bmwiedemann/obs-build that referenced this pull request Sep 10, 2025
for catching openSUSE#1099 and openSUSE#1047
and other weirdness, such as that the first entry is parsed differently.
Might need adaption for code fixes.
bmwiedemann added a commit to bmwiedemann/obs-build that referenced this pull request Sep 25, 2025
for catching openSUSE#1099 and openSUSE#1047
and other weirdness, such as that the first entry is parsed differently.
Might need adaption for code fixes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants