Golang net/http.ParseTime() function example
package net/http
Golang net/http.ParseTime() function usage example
package main
import (
"fmt"
"net/http"
)
func main() {
// example header :
// Accept-Datetime: Thu, 31 May 2007 20:35:00 GMT
time, err := http.ParseTime("Thu, 31 May 2007 20:35:00 GMT")
if err != nil {
panic(err)
}
fmt.Printf("time : %v", time)
}
Output :
time : 2007-05-31 20:35:00 +0000 UTC
Reference :
Advertisement
Something interesting
Tutorials
+10.8k Golang : Natural string sorting example
+5.7k Golang : Error handling methods
+7.9k Javascript : Put image into Chrome browser's console
+11.6k Get form post value in Go
+10.3k Golang : Convert file unix timestamp to UTC time example
+9.4k Golang : Generate EAN barcode
+21.7k Golang : Setting up/configure AWS credentials with official aws-sdk-go
+3.6k Java : Get FX sentiment from website example
+18.8k Golang : How to make function callback or pass value from function as parameter?
+8.6k Golang : Another camera capture GUI application with GTK and OpenCV
+4.4k Linux/MacOSX : Search and delete files by extension
+12.5k Golang : HTTP response JSON encoded data