Created
November 15, 2015 09:38
-
-
Save 2matzzz/327eacfbcb2b8b0a30a7 to your computer and use it in GitHub Desktop.
This file contains 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" | |
) | |
func main() { | |
currentTimeUnix := time.Now().Unix() | |
currentTimeRFC3339 := time.Now().Format("2006-01-02T15:04:05Z07:00") | |
aHourAfter := time.Now().Add(1 * time.Hour).Format("2006-01-02T15:04:05Z07:00") | |
fmt.Printf("Unix:%d\n", currentTimeUnix) | |
fmt.Printf("RFC3339:%s\n", currentTimeRFC3339) | |
fmt.Printf("aHourAfter:%s\n", aHourAfter) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment