Skip to content

Fix manual time entries storing with wrong timezone - #64

Merged
Gawdl3y merged 2 commits into
mainfrom
fix/manual-time-entry-tz
Oct 6, 2026
Merged

Gawdl3y merged 2 commits into
mainfrom
fix/manual-time-entry-tz

Conversation

@Gawdl3y

@Gawdl3y Gawdl3y commented Sep 10, 2026

Copy link
Copy Markdown
Member

Simply calling merge() on a FormRequest inside of passedValidation() doesn't update the validated data since a snapshot of the data is taken at the point of validation completing (before passedValidation() is called).

This PR:

  • Updates the call to merge() to store the ISO 8601 timestamp so it's more "raw" just like if there were no merge call (although this has no consequence the way it's currently used)
  • Overwrites the post-validation snapshot of the start and stop fields so the validated() call in the controller has the proper timezone

@Gawdl3y
Gawdl3y requested a review from a team September 10, 2026 20:56
@Gawdl3y Gawdl3y self-assigned this Sep 10, 2026
@Gawdl3y Gawdl3y added the bug Something isn't working label Sep 10, 2026

@travismolick travismolick left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

When doing internal testing on what this fixes, it introduces a new bug which allows managers to be able to have a person have multiple clocked in times without forcing them to clock out a person, bypassing the check to prevent that.

@Gawdl3y

Gawdl3y commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

Good catch!

@Gawdl3y
Gawdl3y merged commit 5bafb2c into main Oct 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants