mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-26 17:11:42 +00:00
sync - build broken
This commit is contained in:
20
python-garmin-connect/Timezone.go
Normal file
20
python-garmin-connect/Timezone.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package connect
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Timezone represents a timezone in Garmin Connect.
|
||||
type Timezone struct {
|
||||
ID int `json:"unitId"`
|
||||
Key string `json:"unitKey"`
|
||||
GMTOffset float64 `json:"gmtOffset"`
|
||||
DSTOffset float64 `json:"dstOffset"`
|
||||
Group int `json:"groupNumber"`
|
||||
TimeZone string `json:"timeZone"`
|
||||
}
|
||||
|
||||
// Location will (try to) return a location for use with time.Time functions.
|
||||
func (t *Timezone) Location() (*time.Location, error) {
|
||||
return time.LoadLocation(t.Key)
|
||||
}
|
||||
Reference in New Issue
Block a user