From ac607c27577caf62658eebbe0567445bb4c29df4 Mon Sep 17 00:00:00 2001 From: Joel Male Date: Wed, 25 Feb 2026 14:51:29 +1000 Subject: [PATCH] fix: always emit timestamps in UTC to avoid timezone offset issues --- main.go | 6 +++--- payload.json | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 85fff87..cbd6c6a 100644 --- a/main.go +++ b/main.go @@ -482,7 +482,7 @@ type latestRelease struct { } func runAutoUpdater(config *Config) { - t := time.Now().Add(30 * time.Second) + t := time.Now().UTC().Add(30 * time.Second) nextUpdateCheck = &t time.Sleep(30 * time.Second) @@ -496,7 +496,7 @@ func runAutoUpdater(config *Config) { } func scheduleNextUpdateCheck() { - t := time.Now().Add(updateCheckInterval) + t := time.Now().UTC().Add(updateCheckInterval) nextUpdateCheck = &t } @@ -730,7 +730,7 @@ func collectAndSend(config *Config) { func collectMetrics(config *Config) (*Metrics, error) { metrics := &Metrics{ - Timestamp: time.Now(), + Timestamp: time.Now().UTC(), Token: config.Token, Hostname: config.Hostname, CollectorVersion: version, diff --git a/payload.json b/payload.json index a10cead..2e48688 100644 --- a/payload.json +++ b/payload.json @@ -1,9 +1,9 @@ { - "timestamp": "2026-02-14T14:09:08.879637+10:00", + "timestamp": "2026-02-14T04:09:08.879637Z", "token": "pw_tok_example_abc123", "hostname": "web-1", "collector_version": "0.2.0", - "next_update_check": "2026-02-25T16:30:00+10:00", + "next_update_check": "2026-02-25T06:30:00Z", "uptime": 92582, "system": { "os": "linux",