Skip to content

Instantly share code, notes, and snippets.

@voldyman
Created July 9, 2014 12:27
Show Gist options
  • Save voldyman/b6c54882bb712e8dde99 to your computer and use it in GitHub Desktop.
Save voldyman/b6c54882bb712e8dde99 to your computer and use it in GitHub Desktop.
The launchpad API provides date in a weird format, this code parses that date-time
package main
import (
"fmt"
"time"
"reflect"
)
func main() {
test, err := time.Parse( "2006-01-02T15:04:5-07:00", "2014-06-02T16:26:28.514048+00:00")
if err != nil {
fmt.Println("Error Parsing")
panic(err)
}
fmt.Println(test)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment