mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
22 lines
335 B
Go
22 lines
335 B
Go
package status
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func Timezones(timezones map[string]interface{}) map[string]time.Time {
|
|
times := make(map[string]time.Time)
|
|
|
|
for label, timezone := range timezones {
|
|
tzloc, err := time.LoadLocation(timezone.(string))
|
|
|
|
if err != nil {
|
|
continue
|
|
}
|
|
|
|
times[label] = time.Now().In(tzloc)
|
|
}
|
|
|
|
return times
|
|
}
|