fixing windows handling of eastern standard time
This commit is contained in:
parent
841f21921e
commit
b9f2a35a5d
3 changed files with 34 additions and 12 deletions
17
date_windows.go
Normal file
17
date_windows.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue