netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.76k stars 2.54k forks source link

Scheduled Jobs Timezone bug #17108

Closed ridgfam closed 2 weeks ago

ridgfam commented 1 month ago

Deployment Type

Self-hosted

NetBox Version

v4.0.8

Python Version

3.10

Steps to Reproduce

  1. Select Script
  2. Put date and time in Schedule at scheduleScript
  3. Click Run Script

Expected Behavior

Expected it to show as MDT.

Observed Behavior

Shows as UTC instead of MDT scriptScheduled

jeremystretch commented 4 weeks ago

When I schedule a script for a specific time, that time is interpreted by NetBox as the configured time zone (UTC). But in your case it appears to be interpreted in the local time zone and converted to UTC.

@ridgfam what is your TIME_ZONE config parameter set to?

ridgfam commented 4 weeks ago

That is set TIME_ZONE = 'America/Denver'