Guest User

Untitled

a guest
Nov 21st, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. // Sample program to show how to covert time to unix timestamp
  2. package main
  3.  
  4. import (
  5. "fmt"
  6. "time"
  7. )
  8.  
  9. func main() {
  10. t, err := time.Parse(time.RFC3339, "2018-04-25T07:05:12Z")
  11. if err != nil {
  12. panic(err)
  13. }
  14. fmt.Println(t.Unix())
  15. }
Add Comment
Please, Sign In to add comment