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

Set default timezone to London in config #2205

Closed
wants to merge 2 commits into from

Conversation

davidgisbey
Copy link
Contributor

@davidgisbey davidgisbey commented Oct 16, 2023

Description

We've had a bug come in that a that was published at 12.01am is saying that it was published the previous day on the updates section.

Looking at the config I can see that a default timezone hasn't been set. This means it's using UTC. This doesn't account for BST being an hour ahead during the summer time so when the updated_at is passed to Publishing API it's passing a time of an hour earlier than it was published.

We can resolve this by setting the default timezone to London.

As this is a pre-existing bug that's basically always existed, we run into a bit of an issue with data integrity of previous manuals. We can simply republish the most recent published edition of the manual, but there could be quite a large amount of editions which have the incorrect date that won't be updated.

It might be that tackling that in Publishing API itself is the right way to go.

Trello card

https://trello.com/c/idVD4RQT/1794-update-history-shows-the-wrong-date

⚠️ This repo is Continuously Deployed: make sure you follow the guidance ⚠️

Follow these steps if you are doing a Rails upgrade.

@davidgisbey davidgisbey force-pushed the set-default-timezone-to-london-in-config branch from cb9f673 to b4a2720 Compare October 16, 2023 12:18
We've had a bug come in that a that was published at 12.01am is saying
that it was published the previous day on the updates section.

Looking at the config I can see that a default timezone hasn't been set.
This means it's using UTC. This doesn't account for BST being an hour
ahead during the summer time so when the updated_at is passed to
publising API it's passing a time of an hour earlier than it was published.

We can resolve this by setting the default timezone to London.

A bulk republish will be required to resolve this issue too.
@davidgisbey davidgisbey force-pushed the set-default-timezone-to-london-in-config branch from b4a2720 to eedfdab Compare October 16, 2023 12:21
@davidgisbey
Copy link
Contributor Author

closing in place of alphagov/government-frontend#2959

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.

1 participant