Skip to content

Conversation

@carddev81
Copy link
Contributor

Description of the change

Fixes inconsistent timezone handling in calendar components causing incorrect event times during daylight savings transitions.

Screenshot(s)

image

@carddev81 carddev81 requested a review from a team as a code owner November 10, 2025 22:12
@carddev81 carddev81 requested review from calisio and removed request for a team November 10, 2025 22:12
@carddev81 carddev81 requested a review from CK-7vn November 10, 2025 22:12
Copy link
Member

@CK-7vn CK-7vn left a comment

Choose a reason for hiding this comment

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

That issue we talked about, just leaving this comment as a placeholder since we talked in slack, i'll wait for the ping after that bugs fixed.

@carddev81 carddev81 requested a review from CK-7vn November 26, 2025 21:09
Copy link
Member

@CK-7vn CK-7vn left a comment

Choose a reason for hiding this comment

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

Works good, looks good, just one little recommendation to help future proof us I think. I know how annoying this must of been so I commend you for sure!

}

// returns the hour and minute from the first occurrence within the slice of time.Time instances
func getCanonicalHourAndMinute(occurrences []time.Time, timezone string) (int, int) {
Copy link
Member

Choose a reason for hiding this comment

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

I feel like we should at least log an error if there are no occurrences or we fall back to UTC, that way if we run into errors down the road with timezone issues etc, we're not blindly wondering what the heck is going on and at least have some logs.

return &override, nil
}

func (db *DB) GetFacilityCalendar(args *models.QueryContext, dtRng *models.DateRange, classID int) ([]models.FacilityProgramClassEvent, error) {
Copy link
Member

Choose a reason for hiding this comment

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

I know this isn't on you, but after looking through this file, we really should make a note/ticket to clean up this function and a few others in this file, they're violating a good handful of uber style guide stuff, particularly with how huge it is.

@carddev81 carddev81 requested review from corypride and removed request for calisio December 3, 2025 19:56
Copy link
Contributor

@corypride corypride left a comment

Choose a reason for hiding this comment

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

The solution is solid and it tests good

@carddev81 carddev81 merged commit 2e35061 into main Dec 5, 2025
9 of 10 checks passed
@carddev81 carddev81 deleted the carddev81/ticket_id494_dst_issues branch December 5, 2025 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants