2017-02-12 12:02:14 -05:00
|
|
|
// +build !windows
|
|
|
|
|
2017-05-12 20:12:23 -04:00
|
|
|
package util
|
2017-02-12 12:02:14 -05:00
|
|
|
|
|
|
|
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("America/New_York")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return _eastern
|
|
|
|
}
|