Add timezone backend support (handlers, utilities, user context)

- Add FormatInTimezone and FormatTimestamptzInTimezone helpers
  in templates/utils.go for timezone-aware time display
- Add Timezone field to templates.User struct
- Pass user timezone from DB to template context in helpers.go
- Add timezone update handling in auth.go UpdateProfile with
  validation via time.LoadLocation
- Add UpdateTimezoneSettings handler in system_settings.go for
  admin system-wide default timezone using UpdateSystemSetting
This commit is contained in:
2026-04-27 21:30:53 -04:00
parent caf50ade31
commit 27e9a654bf
5 changed files with 70 additions and 0 deletions
+1
View File
@@ -16,6 +16,7 @@ type User struct {
LastName string
CreatedAt time.Time
Token string
Timezone string
}
type PageData struct {