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

wfnews-2407 #2106

Merged
merged 2 commits into from
Oct 30, 2024
Merged

wfnews-2407 #2106

merged 2 commits into from
Oct 30, 2024

Conversation

yzlucas
Copy link
Collaborator

@yzlucas yzlucas commented Oct 29, 2024

The PDT/PST suffix on a timestamp on the full details page needs to automatically adjust depending on the time of the year
https://apps.nrs.gov.bc.ca/int/jira/browse/WFNEWS-2407
image

…utomatically adjust depending on the time of the year
@yzlucas yzlucas changed the title The PDT/PST suffix on a timestamp on the full details page needs to a… wfnews-2407 Oct 29, 2024
Copy link
Collaborator

@sukhpalp sukhpalp left a comment

Choose a reason for hiding this comment

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

I don't think we want to specify a timezone. If we use toLocaleString, it will base it off the user's client time.

const updateOptions: Intl.DateTimeFormatOptions = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: 'numeric',
second: undefined, // this removes the seconds
timeZone: 'America/Los_Angeles', // Pacific Time Zone
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we need to specify timezone? If somebody was using this from the eastern parts of BC, they would be getting the wrong time zone as they are one hour ahead. Would it be enough just to get rid of the fixed PST?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You are right, I forgot to consider some part of BC are off one hour.
Removed timezone option, thanks

@yzlucas yzlucas requested a review from sukhpalp October 30, 2024 04:23
@yzlucas yzlucas merged commit 4826e3f into bcgov:2.4.0 Oct 30, 2024
1 check failed
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