1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/status/timezones.go
2018-04-12 12:00:11 -07:00

21 lines
273 B
Go

package status
import (
"time"
)
func Timezones(zones []string) []time.Time {
times := []time.Time{}
for _, zone := range zones {
loc, err := time.LoadLocation(zone)
if err != nil {
continue
}
times = append(times, time.Now().In(loc))
}
return times
}