Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: Update mock date to postpone timezone related failures #7884

Closed
wants to merge 1 commit into from

Conversation

toreonify
Copy link

Because timezones can change throughout the years, mktime calculates timestamp according to a timezone valid at that date, but tzset uses current timezone and that can lead to an incorrect result.

I've decided on a more recent date to cover timezone changes that happened in other countries (see tzdata-meta for a list of changes).

As soon as there appears a better and tested solution to fix/rewrite sss_utc_to_time_t to properly work with timezones, this date will not need constant updates.

See #7209 for more information.

@alexey-tikhonov
Copy link
Member

Please replace "BUG:" with "Resolves:" in the commit message.
(see https://github.com/SSSD/sssd/blob/master/.git-commit-template#L5 , this template is used by automation scripts)

Because timezones can change throughout the years, mktime calculates timestamp according to a timezone valid at that date, but tzset uses current timezone and that can lead to an incorrect result.

Resolves: SSSD#7209
@alexey-tikhonov
Copy link
Member

$ TZ=UTC date -d @1735732662
Wed Jan  1 11:57:42 AM UTC 2025

ACK

Copy link
Contributor

@thalman thalman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update, ACK

@alexey-tikhonov
Copy link
Member

Pushed PR: #7884

  • master
    • 5c69acc - tests: Update mock date to postpone timezone related failures
  • sssd-2-9
    • 91fe767 - tests: Update mock date to postpone timezone related failures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants