Skip to content

Instantly share code, notes, and snippets.

@dbridges
Created May 13, 2019 17:39
Show Gist options
  • Save dbridges/2dc63c9f5da178923da11d2384c5ac5b to your computer and use it in GitHub Desktop.
Save dbridges/2dc63c9f5da178923da11d2384c5ac5b to your computer and use it in GitHub Desktop.
func (a *atomTime) Time() time.Time {
return time.Time(*a)
}
func (a *atomTime) LocalString() string {
loc, err := time.LoadLocation("Local")
if err != nil {
return a.Time().String()
}
return a.Time().In(loc).Format("Jan 02, 2006 3:04PM")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment