Files
pages/internal/server/timezone.go
T
Anya Tokugawa c1175d389f Implement Knowledge City platform, organizer and DAV integration
Capture accumulated application, UI, CLI, regression tests and design documentation changes, including task project mapping and default CalDAV list naming.

Keep deployment data, backups, local credentials and build artifacts out of Git. Move the Compose enrollment token to an ignored local environment file.
2026-09-27 14:44:43 +09:00

34 lines
464 B
Go

package server
import "time"
func (s *Server) getTimezoneName(domainUUID ...string) string {
tz := s.getDomainConfig("timezone", domainUUID...)
if tz == "" {
return "UTC"
}
_, err := time.LoadLocation(tz)
if err != nil {
return "UTC"
}
return tz
}
func (s *Server) getLocation(domainUUID ...string) *time.Location {
loc, err :=
time.LoadLocation(
s.getTimezoneName(domainUUID...),
)
if err != nil {
return time.UTC
}
return loc
}