fix: migration

This commit is contained in:
Krispire Admin
2026-06-11 01:11:10 +05:30
parent 0655b2314d
commit 0b24ab4b45
6 changed files with 177 additions and 4 deletions
+4 -2
View File
@@ -105,9 +105,11 @@ func (s *ReminderService) SetEnabled(ctx context.Context, userID string, enabled
}
// SetTimezone validates the IANA zone before storing so a bad value can never
// break the (timezone-using) candidate scan.
// break the (timezone-using) candidate scan. Legacy aliases are canonicalized
// first (browsers report e.g. "Asia/Calcutta"): Go resolves them but a
// Postgres without the tzdata backward links rejects them in AT TIME ZONE.
func (s *ReminderService) SetTimezone(ctx context.Context, userID, tz string) error {
tz = strings.TrimSpace(tz)
tz = canonicalTZ(strings.TrimSpace(tz))
if tz == "" {
tz = "UTC"
}