Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Sample program to show how to covert time to unix timestamp
- package main
- import (
- "fmt"
- "time"
- )
- func main() {
- t, err := time.Parse(time.RFC3339, "2018-04-25T07:05:12Z")
- if err != nil {
- panic(err)
- }
- fmt.Println(t.Unix())
- }
Add Comment
Please, Sign In to add comment