fix: migration
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user