1
0
Fork 0
mirror of https://github.com/FrankerFaceZ/FrankerFaceZ.git synced 2025-08-03 08:28:31 +00:00

all health timestamps in UTC

This commit is contained in:
Kane York 2016-06-02 08:39:11 -07:00
parent 24936a6543
commit 842dc64991
2 changed files with 5 additions and 5 deletions

View file

@ -65,7 +65,7 @@ func setupBackend(config *ConfigFile) *backendInfo {
announceStartupURL = fmt.Sprintf("%s%s", b.baseURL, bPathAnnounceStartup) announceStartupURL = fmt.Sprintf("%s%s", b.baseURL, bPathAnnounceStartup)
addTopicURL = fmt.Sprintf("%s%s", b.baseURL, bPathAddTopic) addTopicURL = fmt.Sprintf("%s%s", b.baseURL, bPathAddTopic)
postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats) postStatisticsURL = fmt.Sprintf("%s%s", b.baseURL, bPathAggStats)
epochTime := time.Unix(0, 0) epochTime := time.Unix(0, 0).UTC()
lastBackendSuccess = map[string]time.Time{ lastBackendSuccess = map[string]time.Time{
bPathAnnounceStartup: epochTime, bPathAnnounceStartup: epochTime,
bPathAddTopic: epochTime, bPathAddTopic: epochTime,
@ -221,7 +221,7 @@ func (backend *backendInfo) SendRemoteCommand(remoteCommand, data string, auth A
responseCache.Set(getCacheKey(remoteCommand, data), responseStr, duration) responseCache.Set(getCacheKey(remoteCommand, data), responseStr, duration)
} }
lastBackendSuccess[bPathOtherCommand] = time.Now() lastBackendSuccess[bPathOtherCommand] = time.Now().UTC()
return return
} }
@ -237,7 +237,7 @@ func (backend *backendInfo) SendAggregatedData(sealedForm url.Values) error {
return httpError(resp.StatusCode) return httpError(resp.StatusCode)
} }
lastBackendSuccess[bPathAggStats] = time.Now() lastBackendSuccess[bPathAggStats] = time.Now().UTC()
return resp.Body.Close() return resp.Body.Close()
} }
@ -299,7 +299,7 @@ func (backend *backendInfo) sendTopicNotice(topic string, added bool) error {
return ErrBackendNotOK{Code: resp.StatusCode, Response: respStr} return ErrBackendNotOK{Code: resp.StatusCode, Response: respStr}
} }
lastBackendSuccess[bPathAddTopic] = time.Now() lastBackendSuccess[bPathAddTopic] = time.Now().UTC()
return nil return nil
} }

View file

@ -114,7 +114,7 @@ func SetupServerAndHandle(config *ConfigFile, serveMux *http.ServeMux) {
log.Println("could not announce startup to backend:", err) log.Println("could not announce startup to backend:", err)
} else { } else {
resp.Body.Close() resp.Body.Close()
lastBackendSuccess[bPathAnnounceStartup] = time.Now() lastBackendSuccess[bPathAnnounceStartup] = time.Now().UTC()
} }
if Configuration.UseESLogStashing { if Configuration.UseESLogStashing {