fixing windows handling of eastern standard time

This commit is contained in:
Will Charczuk 2017-02-12 09:02:14 -08:00
parent 841f21921e
commit b9f2a35a5d
3 changed files with 34 additions and 12 deletions

17
date_windows.go Normal file
View file

@ -0,0 +1,17 @@
// +build windows
package chart
import "time"
// Eastern returns the eastern timezone.
func (d date) Eastern() *time.Location {
if _eastern == nil {
_easternLock.Lock()
defer _easternLock.Unlock()
if _eastern == nil {
_eastern, _ = time.LoadLocation("Eastern Standard Time")
}
}
return _eastern
}