1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-07-12 23:50:27 +02:00

use milliseconds for all timestamps (server) (#1447)

This commit is contained in:
Doug Lauder
2021-10-07 07:51:01 -04:00
committed by GitHub
parent f69e9ae927
commit db8d91f889
21 changed files with 843 additions and 387 deletions

View File

@ -9,12 +9,12 @@ import (
"net"
"net/http"
"strings"
"time"
"github.com/gorilla/mux"
"github.com/mattermost/focalboard/server/model"
"github.com/mattermost/focalboard/server/services/audit"
"github.com/mattermost/focalboard/server/services/auth"
"github.com/mattermost/focalboard/server/utils"
"github.com/mattermost/mattermost-server/v6/shared/mlog"
)
@ -386,7 +386,7 @@ func (a *API) attachSession(handler func(w http.ResponseWriter, r *http.Request)
return
}
now := time.Now().Unix()
now := utils.GetMillis()
session := &model.Session{
ID: SingleUser,
Token: token,
@ -403,7 +403,7 @@ func (a *API) attachSession(handler func(w http.ResponseWriter, r *http.Request)
if a.MattermostAuth && r.Header.Get("Mattermost-User-Id") != "" {
userID := r.Header.Get("Mattermost-User-Id")
now := time.Now().Unix()
now := utils.GetMillis()
session := &model.Session{
ID: userID,
Token: userID,