diff options
Diffstat (limited to 'system/admin')
-rw-r--r-- | system/admin/handlers.go | 2 | ||||
-rw-r--r-- | system/admin/upload/upload.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/system/admin/handlers.go b/system/admin/handlers.go index 59e7a66..00add87 100644 --- a/system/admin/handlers.go +++ b/system/admin/handlers.go @@ -1533,7 +1533,7 @@ func editHandler(res http.ResponseWriter, req *http.Request) { // create a timestamp if one was not set if ts == "" { - ts := fmt.Sprintf("%d", time.Now().Unix()*1000) + ts := fmt.Sprintf("%d", int64(time.Nanosecond)*time.Now().UnixNano()/int64(time.Millisecond)) req.PostForm.Set("timestamp", ts) } diff --git a/system/admin/upload/upload.go b/system/admin/upload/upload.go index 486f55c..6b99dfc 100644 --- a/system/admin/upload/upload.go +++ b/system/admin/upload/upload.go @@ -20,7 +20,7 @@ func StoreFiles(req *http.Request) (map[string]string, error) { ts := req.FormValue("timestamp") // timestamp in milliseconds since unix epoch if ts == "" { - ts = fmt.Sprintf("%d", time.Now().Unix()*1000) // Unix() returns seconds since unix epoch + ts = fmt.Sprintf("%d", int64(time.Nanosecond)*time.Now().UnixNano()/int64(time.Millisecond)) // Unix() returns seconds since unix epoch } req.Form.Set("timestamp", ts) |