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

Improve detection of Time-Zone inconsistencies #2456

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

smortex
Copy link
Contributor

@smortex smortex commented Nov 28, 2023

We have a track record of Time-Zone inconsistencies in the events of the
project website (e.g. #1616, #1805, #2288, #2418, #2422, #2431, #2449).

In order to detect these inconsistencies earlier, make the tz
mandatory and check that the Time-Zone offset match the Time-Zone name.
These checks require a working bundle so run it on GitHub actions and
keep the old pre-commit check to only check date formatting using basic
UNIX tooling.

Adjust the events templates to match what we expect.

While here, also check that non-online events have the needed
location.city and location.country.

@smortex
Copy link
Contributor Author

smortex commented Nov 28, 2023

This will hopefully avoid more work for @krisfreedain and @nateynateynate to review and merge my PRs to fix Time-Zone issues 😅

Cc @joshuarrrr who also hit some Time-Zone related issue.

I tried to split each part in a separate commit to make it easier to follow the fix process. As a bonus, we can see that the check script report less and less failures as we go.

Thanks!

@krisfreedain
Copy link
Member

WOW! Thank you @smortex!!

@astephanus - could you give this a look?

We have a track record of Time-Zone inconsistencies in the events of the
project website (e.g. opensearch-project#1616, opensearch-project#1805, opensearch-project#2288, opensearch-project#2418, opensearch-project#2422, opensearch-project#2431, opensearch-project#2449).

In order to detect these inconsistencies earlier, make the `tz`
mandatory and check that the Time-Zone offset match the Time-Zone name.
These checks require a working bundle so run it on GitHub actions and
keep the old pre-commit check to only check date formatting using basic
UNIX tooling.

Adjust the events templates to match what we expect.

While here, also check that non-online events have the needed
`location.city` and `location.country`.

Signed-off-by: Romain Tartière <[email protected]>
Most of these events have a Time-Zone offset of -0700 or -0800 which makes
me think they are all using the America/Los_Angeles Time-Zone (sometimes
with the wrong offset, which will be fixed in another commit).

Updated with:
```
grep -r --files-without-match '^tz:' _events | xargs sed -i '' -E -e'/^online:/a\
tz: America/Los_Angeles'
```

Signed-off-by: Romain Tartière <[email protected]>
These inconsistencies are now being reported, when -0700 and -0800 are
used incorectly.

Signed-off-by: Romain Tartière <[email protected]>
According to the meetup page, the event was on 24.01.2023 at 19:00 local
time.  The Time-Zone offset then correspond to Europe/Warsaw.

Signed-off-by: Romain Tartière <[email protected]>
The website says it started on the 25th and not the 24th in
Charlottesville, same Time-Zone as New York (America/Charlottesville not
being a valid Time-Zone name).

Signed-off-by: Romain Tartière <[email protected]>
These one have the correct offset, but when adding `tz` we did not took
this into account.

Use the America/New_York offset which match the events.

Signed-off-by: Romain Tartière <[email protected]>
These are not RFC822 time representations.  So do not call them that
name, it just add confusion.

Signed-off-by: Romain Tartière <[email protected]>
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