mirror of
https://github.com/araddon/dateparse.git
synced 2024-11-10 11:51:54 +08:00
Doc cleanup
This commit is contained in:
parent
66be9ffaaf
commit
d2a96dcd69
22
README.md
22
README.md
@ -86,13 +86,6 @@ var examples = []string{
|
||||
|
||||
func main() {
|
||||
|
||||
// NOTE: This is very, very important to understand timezone parsing
|
||||
// The time.Local global tells the parse function to use given
|
||||
// location/zone for use in the time.Parse() function
|
||||
// used by this library.
|
||||
loc, _ := time.LoadLocation("America/Denver")
|
||||
time.Local = loc
|
||||
|
||||
table := termtables.CreateTable()
|
||||
|
||||
table.AddHeaders("Input", "Parsed, and Output as %v")
|
||||
@ -105,6 +98,21 @@ func main() {
|
||||
}
|
||||
fmt.Println(table.Render())
|
||||
}
|
||||
|
||||
func init() {
|
||||
// NOTE: This is very, very important to understand timezone parsing
|
||||
// The time.Local global tells the parse function to use given
|
||||
// location/zone for use in the time.Parse() function
|
||||
// used by this library. It uses UTC by default.
|
||||
if uzeTimeZone {
|
||||
loc, _ := time.LoadLocation("America/Denver")
|
||||
time.Local = loc
|
||||
} else {
|
||||
// This is the default behavior
|
||||
//loc, _ := time.LoadLocation("UTC")
|
||||
//time.Local = loc
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**outputs**
|
||||
|
Loading…
Reference in New Issue
Block a user