fixed - now getting latest data for past time rather than get 30s stale there too

This commit is contained in:
Ankit Nayan 2021-05-02 20:49:54 +05:30
parent 00c3342b4d
commit 9c6e66f315

View File

@ -421,7 +421,10 @@ func parseTimeMinusBuffer(param string, r *http.Request) (*time.Time, error) {
return nil, fmt.Errorf("%s param is not in correct timestamp format", param)
}
timeUnix = timeUnix - 30000000000
timeUnixNow := time.Now().UnixNano()
if timeUnix > timeUnixNow-30000000000 {
timeUnix = timeUnix - 30000000000
}
timeFmt := time.Unix(0, timeUnix)