Created
October 17, 2017 03:07
-
-
Save redbarron23/5512418cab79c7922a48f80ca2645ff5 to your computer and use it in GitHub Desktop.
gmt time in go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
// borrowed from here | |
// https://stackoverflow.com/questions/37608823/get-the-current-time-with-gmt2-in-golang | |
func main() { | |
t := time.Now().UTC() | |
fmt.Printf("%02d:%02d:%02d-00:00\n", | |
t.Hour(), t.Minute(), t.Second()) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment