fix: NowHandler outputs format

This commit is contained in:
lab 2023-11-09 11:03:41 +08:00
parent 88f5f43377
commit 39a9b7f887

View File

@ -32,6 +32,6 @@ func HomeHandler(w http.ResponseWriter, r *http.Request) {
func TimeHandler(w http.ResponseWriter, r *http.Request) { func TimeHandler(w http.ResponseWriter, r *http.Request) {
now := time.Now() now := time.Now()
res := now.GoString() res := now.Format(time.RFC3339Nano)
fmt.Fprint(w, res) fmt.Fprint(w, res)
} }