Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tkuchiki/parsetime

date/time parser for golang
https://github.com/tkuchiki/parsetime

golang library parser time

Last synced: 2 months ago
JSON representation

date/time parser for golang

Awesome Lists containing this project

README

        

# parsetime

[![Build Status](https://travis-ci.org/tkuchiki/parsetime.svg?branch=master)](https://travis-ci.org/tkuchiki/parsetime)
[![Coverage Status](https://coveralls.io/repos/tkuchiki/parsetime/badge.svg?branch=master&service=github)](https://coveralls.io/github/tkuchiki/parsetime?branch=master)

date/time parser for golang

## Usage

### `parsetime.NewParseTime`

#### `parsetime.NewParseTime()`

```go
package main

import (
"fmt"
"github.com/tkuchiki/parsetime"
"log"
)

func main() {
p, err := parsetime.NewParseTime()
if err != nil {
log.Fatal(err)
}

t, err2 := p.Parse("2016-01-02T03:04:05")

if err2 != nil {
log.Fatal(err)
}

// Local timezone: JST
// 2016-01-02 03:04:05 +0900 JST
fmt.Println(t)
}
```

#### `parsetime.NewParseTime("location name")`

```go
func main() {
p, err := parsetime.NewParseTime("US/Arizona")
if err != nil {
log.Fatal(err)
}

t, err2 := p.Parse("2016-01-02T03:04:05")

if err2 != nil {
log.Fatal(err)
}

// Local timezone: JST
// 2016-01-02 03:04:05 -0700 MST
fmt.Println(t)
}
```

#### `parsetime.NewParseTime("timezone name")`

```go
func main() {
p, err := parsetime.NewParseTime("MST")
if err != nil {
log.Fatal(err)
}

t, err2 := p.Parse("2016-01-02T03:04:05")

if err2 != nil {
log.Fatal(err)
}

// Local timezone: JST
// 2016-01-02 03:04:05 -0700 MST
fmt.Println(t)
}
```

#### `parsetime.NewParseTime("timezone name", offset)`

```go
func main() {
p, err := parsetime.NewParseTime("MST", -7*3600)
if err != nil {
log.Fatal(err)
}

t, err2 := p.Parse("2016-01-02T03:04:05")

if err2 != nil {
log.Fatal(err)
}

// Local timezone: JST
// 2016-01-02 03:04:05 -0700 MST
fmt.Println(t)
}
```

### `ParseTime`

#### `ParseTime.GetLocation`

Returns `*time.Location`

```go
var loc *time.Location
p, _ := parsetime.NewParseTime()

loc = p.GetLocation()
```

#### `ParseTime.SetLocation`

Sets `*time.Location`

```go
var loc *time.Location
var err error
p, _ := parsetime.NewParseTime()

loc, err = time.LoadLocation("US/Arizona")
p.SetLocation(loc)
```

#### `ParseTime.ISO8601`

Parses ISO8601, RFC3339 date/time string

```go
var t time.Time
var err error

p, _ := parsetime.NewParseTime()

t, err = p.ISO8601("2016-01-02T03:04:05")
```

#### `ParseTime.RFC8xx1123`

Parses RFC822, RFC850, RFC1123 date/time string

```go
var t time.Time
var err error

p, _ := parsetime.NewParseTime()

t, err = p.RFC8xx1123("2016-01-02T03:04:05")
```

#### `ParseTime.ANSIC`

Parses ANSIC date/time string

```go
var t time.Time
var err error

p, _ := parsetime.NewParseTime()

t, err = p.ANSIC("2016-01-02T03:04:05")
```

#### `ParseTime.US`

Parses MM/DD/YYYY format date/time string

```go
var t time.Time
var err error

p, _ := parsetime.NewParseTime()

t, err = p.US("2016-01-02T03:04:05")
```

#### `ParseTime.Parse`

Parses date/time string

```go
var t time.Time
var err error

p, _ := parsetime.NewParseTime()

t, err = p.Parse("2016-01-02T03:04:05")
```

## Examples

#### ISO8601

| Input String | _time.Time |
| ---------------------------------------- | ----------------------------------------- |
| 2006-01-02 15:04 | 2006-01-02 15:04:00 +0900 JST |
| 2006-01-02 15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02 15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02 15:04:05 | 2006-01-02 15:04:05 +0900 JST |
| 2006-01-02 15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05-07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05 -07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05.999999999 | 2006-01-02 15:04:05.999999999 +0900 JST |
| 2006-01-02 15:04:05.999999-07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02 15:04:05.9-07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02 15:04:05.9 -07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02 15:04:05.999-07:00 MST | 2006-01-02 15:04:05.000000999 -0700 -0700 |
| 2006-01-02 15:04:05.999 -07:00 MST | 2006-01-02 15:04:05.000000999 -0700 -0700 |
| 2006-01-02 15:04:05.999999-07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02 15:04:05.999999 -07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02 15:04:05.999999999-07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02 15:04:05.999999999 -07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02T15:04 | 2006-01-02 15:04:00 +0900 JST |
| 2006-01-02T15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02T15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02T15:04:05 | 2006-01-02 15:04:05 +0900 JST |
| 2006-01-02T15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05-07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05 -07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05.999999999 | 2006-01-02 15:04:05.999999999 +0900 JST |
| 2006-01-02T15:04:05.999999999-07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02T15:04:05.999999999 -07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02T15:04:05.999999-07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02T15:04:05.999999 -07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02T15:04:05.9-07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02T15:04:05.9 -07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02 | 2006-01-02 00:00:00 +0900 JST |
| 20060102 | 2006-01-02 00:00:00 +0900 JST |
| 20060102150405 | 2006-01-02 15:04:05 +0900 JST |
| 20060102 150405 | 2006-01-02 15:04:05 +0900 JST |
| 20060102T150405 | 2006-01-02 15:04:05 +0900 JST |
| 15:04:05 | 2016-05-06 15:04:05 +0900 JST |
| 15:04:05-07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 15:04:05 -07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 15:04:05.9-07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 15:04:05.9 -07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 15:04:05.999-07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 15:04:05.999 -07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 15:04:05.999999-07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 15:04:05.999999 -07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 15:04:05.999999999-07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 15:04:05.999999999 -07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 150405-07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 150405 -07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 150405.9-07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 150405.9 -07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 150405.999-07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 150405.999 -07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 150405.999999-07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 150405.999999 -07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 150405.999999999-07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 150405.999999999 -07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 2006-01-02 15:04:05Z | 2006-01-02 15:04:05 +0000 UTC |
| 2006-01-02T15:04:05Z | 2006-01-02 15:04:05 +0000 UTC |
| 2006-01-02 15:04:05.9Z | 2006-01-02 15:04:05.000000009 +0000 UTC |
| 2006-01-02T15:04:05.9Z | 2006-01-02 15:04:05.000000009 +0000 UTC |
| 2006-01-02 15:04:05.999Z | 2006-01-02 15:04:05.000000999 +0000 UTC |
| 2006-01-02T15:04:05.999Z | 2006-01-02 15:04:05.000000999 +0000 UTC |
| 2006-01-02 15:04:05.999999Z | 2006-01-02 15:04:05.000999999 +0000 UTC |
| 2006-01-02T15:04:05.999999Z | 2006-01-02 15:04:05.000999999 +0000 UTC |
| 2006-01-02 15:04:05.999999999Z | 2006-01-02 15:04:05.999999999 +0000 UTC |
| 2006-01-02T15:04:05.999999999Z | 2006-01-02 15:04:05.999999999 +0000 UTC |

#### RFC8xx1123

| Input String | _time.Time |
| ---------------------------------------- | ----------------------------------------- |
| 02-Jan-06 1504 MST | 2006-01-02 15:04:00 -0700 MST |
| 02-Jan-06 15:04 MST | 2006-01-02 15:04:00 -0700 MST |
| 02-Jan-06 150405 MST | 2006-01-02 15:04:05 -0700 MST |
| 02-Jan-06 15:04:05 MST | 2006-01-02 15:04:05 -0700 MST |
| 02-Jan-06 1504-0700 | 2006-01-02 15:04:00 -0700 -0700 |
| 02-Jan-06 15:04-0700 | 2006-01-02 15:04:00 -0700 -0700 |
| 02-Jan-06 150405-0700 | 2006-01-02 15:04:05 -0700 -0700 |
| 02-Jan-06 15:04:05-0700 | 2006-01-02 15:04:05 -0700 -0700 |
| 02-Jan-06 15:04 -0700 | 2006-01-02 15:04:00 -0700 -0700 |
| 02-Jan-06 15:04:05 -0700 | 2006-01-02 15:04:05 -0700 -0700 |
| Monday, 02-Jan-06 15:04 MST | 2006-01-02 15:04:00 -0700 MST |
| Monday, 02-Jan-06 15:04:05 MST | 2006-01-02 15:04:05 -0700 MST |
| Mon, 02-Jan-06 15:04 MST | 2006-01-02 15:04:00 -0700 MST |
| Mon, 02-Jan-06 15:04:05 MST | 2006-01-02 15:04:05 -0700 MST |
| Mon, 02-Jan-06 15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-06 15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-06 15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-06 15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-2006 15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-2006 15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-2006 15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-2006 15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-70 15:04-07:00 | 1970-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-70 15:04:05-07:00 | 1970-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-70 15:04 -07:00 | 1970-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-70 15:04:05 -07:00 | 1970-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-99 15:04-07:00 | 1999-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-99 15:04:05-07:00 | 1999-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-99 15:04:05 -07:00 | 1999-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-00 15:04-07:00 | 2000-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05-07:00 | 2000-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05 -07:00 | 2000-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.9-07:00 | 2000-01-02 15:04:05.000000009 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.9 -07:00 | 2000-01-02 15:04:05.000000009 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999-07:00 | 2000-01-02 15:04:05.000000999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999 -07:00 | 2000-01-02 15:04:05.000000999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999-07:00 | 2000-01-02 15:04:05.000999999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999 -07:00 | 2000-01-02 15:04:05.000999999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999999-07:00 | 2000-01-02 15:04:05.999999999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999999 -07:00 | 2000-01-02 15:04:05.999999999 -0700 -0700 |

#### ANSIC

| Input String | _time.Time |
| ------------------------------- | --------------------------------------- |
| Mon Jan 02 150405 2006 | 2006-01-02 15:04:05 +0900 JST |
| Mon Jan 02 15:04:05 2006 | 2006-01-02 15:04:05 +0900 JST |
| Mon Jan 02 150405 MST 2006 | 2006-01-02 15:04:05 -0700 MST |
| Mon Jan 02 15:04:05 MST 2006 | 2006-01-02 15:04:05 -0700 MST |
| Mon Jan 02 1504-07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 15:04-07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 1504 -07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 15:04 -07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 150405-07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon Jan 02 15:04:05-07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon Jan 02 150405 -07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon Jan 02 15:04:05 -07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Jan 02 150405 | 2016-01-02 15:04:05 +0900 JST |
| Jan 02 15:04:05 | 2016-01-02 15:04:05 +0900 JST |
| Jan 02 150405.9 | 2016-01-02 15:04:05.000000009 +0900 JST |
| Jan 02 15:04:05.9 | 2016-01-02 15:04:05.000000009 +0900 JST |
| Jan 02 150405.999 | 2016-01-02 15:04:05.000000999 +0900 JST |
| Jan 02 15:04:05.999 | 2016-01-02 15:04:05.000000999 +0900 JST |
| Jan 02 150405.999999 | 2016-01-02 15:04:05.000999999 +0900 JST |
| Jan 02 15:04:05.999999 | 2016-01-02 15:04:05.000999999 +0900 JST |
| Jan 02 150405.999999999 | 2016-01-02 15:04:05.999999999 +0900 JST |
| Jan 02 15:04:05.999999999 | 2016-01-02 15:04:05.999999999 +0900 JST |

#### US

| Input String | _time.Time |
| ---------------------------------------- | --------------------------------------- |
| 11:04AM | 2016-05-06 11:04:00 +0900 JST |
| 11:04PM | 2016-05-06 23:04:00 +0900 JST |
| 11:04 AM | 2016-05-06 11:04:00 +0900 JST |
| 11:04 PM | 2016-05-06 23:04:00 +0900 JST |
| 11:04:05 AM | 2016-05-06 11:04:05 +0900 JST |
| 11:04:05 PM | 2016-05-06 23:04:05 +0900 JST |
| 11:04:05.9AM | 2016-05-06 11:04:05.000000009 +0900 JST |
| 11:04:05.9 AM | 2016-05-06 11:04:05.000000009 +0900 JST |
| 11:04:05.9PM | 2016-05-06 23:04:05.000000009 +0900 JST |
| 11:04:05.9 PM | 2016-05-06 23:04:05.000000009 +0900 JST |
| 11:04:05.999AM | 2016-05-06 11:04:05.000000999 +0900 JST |
| 11:04:05.999 AM | 2016-05-06 11:04:05.000000999 +0900 JST |
| 11:04:05.999PM | 2016-05-06 23:04:05.000000999 +0900 JST |
| 11:04:05.999 PM | 2016-05-06 23:04:05.000000999 +0900 JST |
| 11:04:05.999999AM | 2016-05-06 11:04:05.000999999 +0900 JST |
| 11:04:05.999999 AM | 2016-05-06 11:04:05.000999999 +0900 JST |
| 11:04:05.999999PM | 2016-05-06 23:04:05.000999999 +0900 JST |
| 11:04:05.999999 PM | 2016-05-06 23:04:05.000999999 +0900 JST |
| 11:04:05.999999999AM | 2016-05-06 11:04:05.999999999 +0900 JST |
| 11:04:05.999999999 AM | 2016-05-06 11:04:05.999999999 +0900 JST |
| 11:04:05.999999999PM | 2016-05-06 23:04:05.999999999 +0900 JST |
| 11:04:05.999999999 PM | 2016-05-06 23:04:05.999999999 +0900 JST |
| 01-02-06 3:04AM | 2006-01-02 03:04:00 +0900 JST |
| 01-02-06 3:04 AM | 2006-01-02 03:04:00 +0900 JST |
| 01-02-06 3:04PM | 2006-01-02 15:04:00 +0900 JST |
| 01-02-06 3:04 PM | 2006-01-02 15:04:00 +0900 JST |
| 01-02-06 03:04:05AM | 2006-01-02 03:04:05 +0900 JST |
| 01-02-06 03:04:05 AM | 2006-01-02 03:04:05 +0900 JST |
| 01-02-06 03:04:05PM | 2006-01-02 15:04:05 +0900 JST |
| 01-02-06 03:04:05 PM | 2006-01-02 15:04:05 +0900 JST |
| 01-02-06 03:04:05.9AM | 2006-01-02 03:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.9 AM | 2006-01-02 03:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.9PM | 2006-01-02 15:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.9 PM | 2006-01-02 15:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.999AM | 2006-01-02 03:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999 AM | 2006-01-02 03:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999PM | 2006-01-02 15:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999 PM | 2006-01-02 15:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999999AM | 2006-01-02 03:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999 AM | 2006-01-02 03:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999PM | 2006-01-02 15:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999 PM | 2006-01-02 15:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999999AM | 2006-01-02 03:04:05.999999999 +0900 JST |
| 01-02-06 03:04:05.999999999 AM | 2006-01-02 03:04:05.999999999 +0900 JST |
| 01-02-06 03:04:05.999999999PM | 2006-01-02 15:04:05.999999999 +0900 JST |
| 01-02-06 03:04:05.999999999 PM | 2006-01-02 15:04:05.999999999 +0900 JST |
| Jan 2, 2006 | 2006-01-02 00:00:00 +0900 JST |
| Jan 2, 2006 at 3:04am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 03:04am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 3:04pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 03:04pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 3:04 am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 03:04 am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 3:04 pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 03:04 pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 3:04:05am (MST) | 2006-01-02 03:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05pm (MST) | 2006-01-02 15:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05 am (MST) | 2006-01-02 03:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05 pm (MST) | 2006-01-02 15:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05.9am (MST) | 2006-01-02 03:04:05.000000009 -0700 MST |
| Jan 2, 2006 at 3:04:05.9pm (MST) | 2006-01-02 15:04:05.000000009 -0700 MST |
| Jan 2, 2006 at 3:04:05.999am (MST) | 2006-01-02 03:04:05.000000999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999pm (MST) | 2006-01-02 15:04:05.000000999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999am (MST) | 2006-01-02 03:04:05.000999999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999pm (MST) | 2006-01-02 15:04:05.000999999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999999am (MST) | 2006-01-02 03:04:05.999999999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999999pm (MST) | 2006-01-02 15:04:05.999999999 -0700 MST |
| Jan 2, 2006 at 3:04am MST | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 3:04pm MST | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 3:04am -07:00 | 2006-01-02 03:04:00 -0700 -0700 |
| Jan 2, 2006 at 3:04pm -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Jan 2, 2006 at 3:04:05am MST | 2006-01-02 03:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05pm MST | 2006-01-02 15:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05am -07:00 | 2006-01-02 03:04:05 -0700 -0700 |
| Jan 2, 2006 at 3:04:05pm -07:00 | 2006-01-02 15:04:05 -0700 -0700 |

#### Parse

| Input String | _time.Time |
| ---------------------------------------- | ----------------------------------------- |
| 2006-01-02 15:04 | 2006-01-02 15:04:00 +0900 JST |
| 2006-01-02 15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02 15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02 15:04:05 | 2006-01-02 15:04:05 +0900 JST |
| 2006-01-02 15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05-07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05 -07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02 15:04:05.999999999 | 2006-01-02 15:04:05.999999999 +0900 JST |
| 2006-01-02 15:04:05.999999-07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02 15:04:05.9-07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02 15:04:05.9 -07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02 15:04:05.999-07:00 MST | 2006-01-02 15:04:05.000000999 -0700 -0700 |
| 2006-01-02 15:04:05.999 -07:00 MST | 2006-01-02 15:04:05.000000999 -0700 -0700 |
| 2006-01-02 15:04:05.999999-07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02 15:04:05.999999 -07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02 15:04:05.999999999-07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02 15:04:05.999999999 -07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02T15:04 | 2006-01-02 15:04:00 +0900 JST |
| 2006-01-02T15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02T15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| 2006-01-02T15:04:05 | 2006-01-02 15:04:05 +0900 JST |
| 2006-01-02T15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05-07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05 -07:00 MST | 2006-01-02 15:04:05 -0700 -0700 |
| 2006-01-02T15:04:05.999999999 | 2006-01-02 15:04:05.999999999 +0900 JST |
| 2006-01-02T15:04:05.999999999-07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02T15:04:05.999999999 -07:00 MST | 2006-01-02 15:04:05.999999999 -0700 -0700 |
| 2006-01-02T15:04:05.999999-07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02T15:04:05.999999 -07:00 MST | 2006-01-02 15:04:05.000999999 -0700 -0700 |
| 2006-01-02T15:04:05.9-07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02T15:04:05.9 -07:00 MST | 2006-01-02 15:04:05.000000009 -0700 -0700 |
| 2006-01-02 | 2006-01-02 00:00:00 +0900 JST |
| 20060102 | 2006-01-02 00:00:00 +0900 JST |
| 20060102150405 | 2006-01-02 15:04:05 +0900 JST |
| 20060102 150405 | 2006-01-02 15:04:05 +0900 JST |
| 20060102T150405 | 2006-01-02 15:04:05 +0900 JST |
| 15:04:05 | 2016-05-06 15:04:05 +0900 JST |
| 15:04:05-07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 15:04:05 -07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 15:04:05.9-07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 15:04:05.9 -07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 15:04:05.999-07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 15:04:05.999 -07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 15:04:05.999999-07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 15:04:05.999999 -07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 15:04:05.999999999-07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 15:04:05.999999999 -07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 150405-07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 150405 -07:00 MST | 2016-05-06 15:04:05 -0700 -0700 |
| 150405.9-07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 150405.9 -07:00 MST | 2016-05-06 15:04:05.000000009 -0700 -0700 |
| 150405.999-07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 150405.999 -07:00 MST | 2016-05-06 15:04:05.000000999 -0700 -0700 |
| 150405.999999-07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 150405.999999 -07:00 MST | 2016-05-06 15:04:05.000999999 -0700 -0700 |
| 150405.999999999-07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 150405.999999999 -07:00 MST | 2016-05-06 15:04:05.999999999 -0700 -0700 |
| 2006-01-02 15:04:05Z | 2006-01-02 15:04:05 +0000 UTC |
| 2006-01-02T15:04:05Z | 2006-01-02 15:04:05 +0000 UTC |
| 2006-01-02 15:04:05.9Z | 2006-01-02 15:04:05.000000009 +0000 UTC |
| 2006-01-02T15:04:05.9Z | 2006-01-02 15:04:05.000000009 +0000 UTC |
| 2006-01-02 15:04:05.999Z | 2006-01-02 15:04:05.000000999 +0000 UTC |
| 2006-01-02T15:04:05.999Z | 2006-01-02 15:04:05.000000999 +0000 UTC |
| 2006-01-02 15:04:05.999999Z | 2006-01-02 15:04:05.000999999 +0000 UTC |
| 2006-01-02T15:04:05.999999Z | 2006-01-02 15:04:05.000999999 +0000 UTC |
| 2006-01-02 15:04:05.999999999Z | 2006-01-02 15:04:05.999999999 +0000 UTC |
| 2006-01-02T15:04:05.999999999Z | 2006-01-02 15:04:05.999999999 +0000 UTC |
| 02-Jan-06 1504 MST | 2006-01-02 15:04:00 -0700 MST |
| 02-Jan-06 15:04 MST | 2006-01-02 15:04:00 -0700 MST |
| 02-Jan-06 150405 MST | 2006-01-02 15:04:05 -0700 MST |
| 02-Jan-06 15:04:05 MST | 2006-01-02 15:04:05 -0700 MST |
| 02-Jan-06 1504-0700 | 2006-01-02 15:04:00 -0700 -0700 |
| 02-Jan-06 15:04-0700 | 2006-01-02 15:04:00 -0700 -0700 |
| 02-Jan-06 150405-0700 | 2006-01-02 15:04:05 -0700 -0700 |
| 02-Jan-06 15:04:05-0700 | 2006-01-02 15:04:05 -0700 -0700 |
| 02-Jan-06 15:04 -0700 | 2006-01-02 15:04:00 -0700 -0700 |
| 02-Jan-06 15:04:05 -0700 | 2006-01-02 15:04:05 -0700 -0700 |
| Monday, 02-Jan-06 15:04 MST | 2006-01-02 15:04:00 -0700 MST |
| Monday, 02-Jan-06 15:04:05 MST | 2006-01-02 15:04:05 -0700 MST |
| Mon, 02-Jan-06 15:04 MST | 2006-01-02 15:04:00 -0700 MST |
| Mon, 02-Jan-06 15:04:05 MST | 2006-01-02 15:04:05 -0700 MST |
| Mon, 02-Jan-06 15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-06 15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-06 15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-06 15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-2006 15:04-07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-2006 15:04:05-07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-2006 15:04 -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-2006 15:04:05 -07:00 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-70 15:04-07:00 | 1970-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-70 15:04:05-07:00 | 1970-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-70 15:04 -07:00 | 1970-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-70 15:04:05 -07:00 | 1970-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-99 15:04-07:00 | 1999-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-99 15:04:05-07:00 | 1999-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-99 15:04:05 -07:00 | 1999-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-00 15:04-07:00 | 2000-01-02 15:04:00 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05-07:00 | 2000-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05 -07:00 | 2000-01-02 15:04:05 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.9-07:00 | 2000-01-02 15:04:05.000000009 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.9 -07:00 | 2000-01-02 15:04:05.000000009 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999-07:00 | 2000-01-02 15:04:05.000000999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999 -07:00 | 2000-01-02 15:04:05.000000999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999-07:00 | 2000-01-02 15:04:05.000999999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999 -07:00 | 2000-01-02 15:04:05.000999999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999999-07:00 | 2000-01-02 15:04:05.999999999 -0700 -0700 |
| Mon, 02-Jan-00 15:04:05.999999999 -07:00 | 2000-01-02 15:04:05.999999999 -0700 -0700 |
| Mon Jan 02 150405 2006 | 2006-01-02 15:04:05 +0900 JST |
| Mon Jan 02 15:04:05 2006 | 2006-01-02 15:04:05 +0900 JST |
| Mon Jan 02 150405 MST 2006 | 2006-01-02 15:04:05 -0700 MST |
| Mon Jan 02 15:04:05 MST 2006 | 2006-01-02 15:04:05 -0700 MST |
| Mon Jan 02 1504-07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 15:04-07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 1504 -07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 15:04 -07:00 2006 | 2006-01-02 15:04:00 -0700 -0700 |
| Mon Jan 02 150405-07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon Jan 02 15:04:05-07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon Jan 02 150405 -07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Mon Jan 02 15:04:05 -07:00 2006 | 2006-01-02 15:04:05 -0700 -0700 |
| Jan 02 150405 | 2016-01-02 15:04:05 +0900 JST |
| Jan 02 15:04:05 | 2016-01-02 15:04:05 +0900 JST |
| Jan 02 150405.9 | 2016-01-02 15:04:05.000000009 +0900 JST |
| Jan 02 15:04:05.9 | 2016-01-02 15:04:05.000000009 +0900 JST |
| Jan 02 150405.999 | 2016-01-02 15:04:05.000000999 +0900 JST |
| Jan 02 15:04:05.999 | 2016-01-02 15:04:05.000000999 +0900 JST |
| Jan 02 150405.999999 | 2016-01-02 15:04:05.000999999 +0900 JST |
| Jan 02 15:04:05.999999 | 2016-01-02 15:04:05.000999999 +0900 JST |
| Jan 02 150405.999999999 | 2016-01-02 15:04:05.999999999 +0900 JST |
| Jan 02 15:04:05.999999999 | 2016-01-02 15:04:05.999999999 +0900 JST |
| 11:04AM | 2016-05-06 11:04:00 +0900 JST |
| 11:04PM | 2016-05-06 23:04:00 +0900 JST |
| 11:04 AM | 2016-05-06 11:04:00 +0900 JST |
| 11:04 PM | 2016-05-06 23:04:00 +0900 JST |
| 11:04:05 AM | 2016-05-06 11:04:05 +0900 JST |
| 11:04:05 PM | 2016-05-06 23:04:05 +0900 JST |
| 11:04:05.9AM | 2016-05-06 11:04:05.000000009 +0900 JST |
| 11:04:05.9 AM | 2016-05-06 11:04:05.000000009 +0900 JST |
| 11:04:05.9PM | 2016-05-06 23:04:05.000000009 +0900 JST |
| 11:04:05.9 PM | 2016-05-06 23:04:05.000000009 +0900 JST |
| 11:04:05.999AM | 2016-05-06 11:04:05.000000999 +0900 JST |
| 11:04:05.999 AM | 2016-05-06 11:04:05.000000999 +0900 JST |
| 11:04:05.999PM | 2016-05-06 23:04:05.000000999 +0900 JST |
| 11:04:05.999 PM | 2016-05-06 23:04:05.000000999 +0900 JST |
| 11:04:05.999999AM | 2016-05-06 11:04:05.000999999 +0900 JST |
| 11:04:05.999999 AM | 2016-05-06 11:04:05.000999999 +0900 JST |
| 11:04:05.999999PM | 2016-05-06 23:04:05.000999999 +0900 JST |
| 11:04:05.999999 PM | 2016-05-06 23:04:05.000999999 +0900 JST |
| 11:04:05.999999999AM | 2016-05-06 11:04:05.999999999 +0900 JST |
| 11:04:05.999999999 AM | 2016-05-06 11:04:05.999999999 +0900 JST |
| 11:04:05.999999999PM | 2016-05-06 23:04:05.999999999 +0900 JST |
| 11:04:05.999999999 PM | 2016-05-06 23:04:05.999999999 +0900 JST |
| 01-02-06 3:04AM | 2006-01-02 03:04:00 +0900 JST |
| 01-02-06 3:04 AM | 2006-01-02 03:04:00 +0900 JST |
| 01-02-06 3:04PM | 2006-01-02 15:04:00 +0900 JST |
| 01-02-06 3:04 PM | 2006-01-02 15:04:00 +0900 JST |
| 01-02-06 03:04:05AM | 2006-01-02 03:04:05 +0900 JST |
| 01-02-06 03:04:05 AM | 2006-01-02 03:04:05 +0900 JST |
| 01-02-06 03:04:05PM | 2006-01-02 15:04:05 +0900 JST |
| 01-02-06 03:04:05 PM | 2006-01-02 15:04:05 +0900 JST |
| 01-02-06 03:04:05.9AM | 2006-01-02 03:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.9 AM | 2006-01-02 03:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.9PM | 2006-01-02 15:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.9 PM | 2006-01-02 15:04:05.000000009 +0900 JST |
| 01-02-06 03:04:05.999AM | 2006-01-02 03:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999 AM | 2006-01-02 03:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999PM | 2006-01-02 15:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999 PM | 2006-01-02 15:04:05.000000999 +0900 JST |
| 01-02-06 03:04:05.999999AM | 2006-01-02 03:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999 AM | 2006-01-02 03:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999PM | 2006-01-02 15:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999 PM | 2006-01-02 15:04:05.000999999 +0900 JST |
| 01-02-06 03:04:05.999999999AM | 2006-01-02 03:04:05.999999999 +0900 JST |
| 01-02-06 03:04:05.999999999 AM | 2006-01-02 03:04:05.999999999 +0900 JST |
| 01-02-06 03:04:05.999999999PM | 2006-01-02 15:04:05.999999999 +0900 JST |
| 01-02-06 03:04:05.999999999 PM | 2006-01-02 15:04:05.999999999 +0900 JST |
| Jan 2, 2006 | 2006-01-02 00:00:00 +0900 JST |
| Jan 2, 2006 at 3:04am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 03:04am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 3:04pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 03:04pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 3:04 am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 03:04 am (MST) | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 3:04 pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 03:04 pm (MST) | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 3:04:05am (MST) | 2006-01-02 03:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05pm (MST) | 2006-01-02 15:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05 am (MST) | 2006-01-02 03:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05 pm (MST) | 2006-01-02 15:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05.9am (MST) | 2006-01-02 03:04:05.000000009 -0700 MST |
| Jan 2, 2006 at 3:04:05.9pm (MST) | 2006-01-02 15:04:05.000000009 -0700 MST |
| Jan 2, 2006 at 3:04:05.999am (MST) | 2006-01-02 03:04:05.000000999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999pm (MST) | 2006-01-02 15:04:05.000000999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999am (MST) | 2006-01-02 03:04:05.000999999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999pm (MST) | 2006-01-02 15:04:05.000999999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999999am (MST) | 2006-01-02 03:04:05.999999999 -0700 MST |
| Jan 2, 2006 at 3:04:05.999999999pm (MST) | 2006-01-02 15:04:05.999999999 -0700 MST |
| Jan 2, 2006 at 3:04am MST | 2006-01-02 03:04:00 -0700 MST |
| Jan 2, 2006 at 3:04pm MST | 2006-01-02 15:04:00 -0700 MST |
| Jan 2, 2006 at 3:04am -07:00 | 2006-01-02 03:04:00 -0700 -0700 |
| Jan 2, 2006 at 3:04pm -07:00 | 2006-01-02 15:04:00 -0700 -0700 |
| Jan 2, 2006 at 3:04:05am MST | 2006-01-02 03:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05pm MST | 2006-01-02 15:04:05 -0700 MST |
| Jan 2, 2006 at 3:04:05am -07:00 | 2006-01-02 03:04:05 -0700 -0700 |
| Jan 2, 2006 at 3:04:05pm -07:00 | 2006-01-02 15:04:05 -0700 -0700 |