go-chart/util/date_windows.go

18 lines
295 B
Go
Raw Permalink Normal View History

// +build windows
package util
import "time"
// Eastern returns the eastern timezone.
func (d date) Eastern() *time.Location {
if _eastern == nil {
_easternLock.Lock()
defer _easternLock.Unlock()
if _eastern == nil {
2017-02-12 23:09:00 +01:00
_eastern, _ = time.LoadLocation("EST")
}
}
return _eastern
}