Server heartbeat using wrong time zone

dashboard
Tags: #<Tag:0x00007f499bb7cd70>

#1

Hello,

I’m encountering an issue where the dashboard is reporting that my server’s last heartbeat was sent four hours ago. The HeartbeatInterval is set to 10 seconds, and I can see the heartbeat DateTime updating, but it’s always four hours in the past. This is triggering the “possibly aborted” warning next to the server name, but the server never gets removed. Four hours is the difference between my local time zone (EDT) and UTC, so I assume that’s where the issue is. Any suggestions?

Thanks!


#2

Figured it out. The problem originates in the Hangfire.SQLite nuget package. The MonitoringApi is returning heartbeats that are already time zone shifted, but the dashboard expects them in UTC and performs its own shift (e.g. @Html.RelativeTime(server.Heartbeat.Value)) resulting in the four hour difference.

I switched to the Hangfire.SQLite.Core package and the problem is gone.