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

Test timestamps in previous daylight savings period generate correct time today #1839

Open
5 tasks
Tracked by #1838
JackHaeg opened this issue Jan 21, 2025 · 0 comments
Open
5 tasks
Tracked by #1838
Assignees
Labels
Bug p-feature: Check In Research Researching best approach/solutions role: Back End size: 2pt Can be done in 7-12 hours

Comments

@JackHaeg
Copy link
Member

JackHaeg commented Jan 21, 2025

Overview:

It would be helpful for multiple team members to work on this issue individually and show up with results.

A timestamp generated previously before daylight savings hours have changed should generate a timestamp in the current daylight savings time equivalent to the correct hours (e.g., 7pm PST -7 six months ago should generate a timestamp today of 7pm PST -8).

Current overview of Check In Bug per @trillium:

Overview:

  • We have accurate timestamps for when the event should start, but the timestamp's date creation is happening sometimes on the day before because of timezone differences between Pacific Time and GMT.
  • So, we need to update the backend function to take into account timezone differences of the base timestamp vs. now.

Here's a summary of what happens with events on VRMS:

  • A recurring event is generated or updated
    • The front end sends a timestamp with the user's selected time to the backend
    • The backend stores that timestamp in GMT
  • Periodically (weekly) the backend runs a script checking to see if any events happen on a day of the week (e.g., Thursday).
    • Within this bucket of events, a new date is generated in today's time and then the hour of that now current timestamp is set to the same hour as the stored recurring event hour.
    • Come check in time, a separate script is run to see if any of the events should be considered open (I believe the window is 30 min before start time and 30 min after the end of the event).
    • If the event's date is off, due to it being created in the wrong timezone (e.g., GMT vs. PST), then when the hour is assigned, the time is roughly off by 1 day or +/- 1 hour.

Action Items:

  • Take a look at VRMS/backend/workers/createRecurringEvents.js and write an overview of what this function does.
    • Observe and take note of areas where this code could be refactored into smaller reusable parts.
    • Discuss findings with team.
  • Employ agreed upon refactoring suggestions.
    • Include unit tests to ensure functionality.

Resources/Instructions:

@github-project-automation github-project-automation bot moved this to New Issue Approval in P: VRMS: Project Board Jan 21, 2025
@JackHaeg JackHaeg changed the title A timestamp generated previously before daylight savings hours have changed should generate a timestamp in the current daylight savings time equivalent to the correct hours (e.g., 7pm PST -7 six months ago should generate a timestamp today of 7pm PST -8). Test timestamps in previous daylight savings period generate correct time today Jan 21, 2025
@JackHaeg JackHaeg added this to the 04.01 Existing Features milestone Jan 21, 2025
@JackHaeg JackHaeg moved this from New Issue Approval to Prioritized Backlog in P: VRMS: Project Board Jan 21, 2025
@JackHaeg JackHaeg added the Research Researching best approach/solutions label Jan 21, 2025
@kurtmgray kurtmgray self-assigned this Jan 21, 2025
@kurtmgray kurtmgray moved this from Prioritized Backlog to In progress in P: VRMS: Project Board Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug p-feature: Check In Research Researching best approach/solutions role: Back End size: 2pt Can be done in 7-12 hours
Projects
Status: In progress
Development

No branches or pull requests

2 participants