Time display in web interface #8233

Closed
opened 2025-12-29 20:34:07 +01:00 by adam · 7 comments
Owner

Originally created by @sk011 on GitHub (Jun 23, 2023).

NetBox version

v3.5.3

Python version

3.8

Steps to Reproduce

  1. Click create item example VLAN
  2. Click on ID Change log
  3. Time dispaly error
    system date/time Fri 23 Jun 2023 09:55:09 MSK
    date/time in netbox/configuration.py TIME_ZONE = 'UTC'
    date/time in DB
postgres=# select NOW();
              now              
-------------------------------
 2023-06-23 09:55:46.821546+03
(1 row)

postgres=# show timezone;
   TimeZone    
---------------
 Europe/Moscow
(1 row)
netbox=# select created,last_updated,vid from ipam_vlan where vid = '1024';
            created            |         last_updated          | vid  
-------------------------------+-------------------------------+------
 2023-06-23 09:55:22.120319+03 | 2023-06-23 09:55:22.120346+03 | 1024


image

Expected Behavior

correct time display

Observed Behavior

time in changelog incorrect regarding OS timezone

Originally created by @sk011 on GitHub (Jun 23, 2023). ### NetBox version v3.5.3 ### Python version 3.8 ### Steps to Reproduce 1. Click create item example VLAN 2. Click on ID Change log 3. Time dispaly error system date/time Fri 23 Jun 2023 09:55:09 MSK date/time in netbox/configuration.py TIME_ZONE = 'UTC' date/time in DB ``` postgres=# select NOW(); now ------------------------------- 2023-06-23 09:55:46.821546+03 (1 row) postgres=# show timezone; TimeZone --------------- Europe/Moscow (1 row) netbox=# select created,last_updated,vid from ipam_vlan where vid = '1024'; created | last_updated | vid -------------------------------+-------------------------------+------ 2023-06-23 09:55:22.120319+03 | 2023-06-23 09:55:22.120346+03 | 1024 ``` ![image](https://github.com/netbox-community/netbox/assets/1744917/99f6460e-f188-4d49-a753-3806ad74e62e) ### Expected Behavior correct time display ### Observed Behavior time in changelog incorrect regarding OS timezone
adam closed this issue 2025-12-29 20:34:07 +01:00
Author
Owner

@abhi1693 commented on GitHub (Jun 23, 2023):

Could you expand more on what you are expecting to be fixed here? I'm not able to understand what fix you want implemented.

@abhi1693 commented on GitHub (Jun 23, 2023): Could you expand more on what you are expecting to be fixed here? I'm not able to understand what fix you want implemented.
Author
Owner

@sk011 commented on GitHub (Jun 23, 2023):

Could you expand more on what you are expecting to be fixed here? I'm not able to understand what fix you want implemented.

on screenshot we have section "Change" filed Time +6 hours regarding UTC timezone or +3 regarding system timezone MSK (that is, in the future)
in the section "Post-Сhange Data" fields created & last_updated look right

@sk011 commented on GitHub (Jun 23, 2023): > Could you expand more on what you are expecting to be fixed here? I'm not able to understand what fix you want implemented. on screenshot we have section "Change" filed Time +6 hours regarding UTC timezone or +3 regarding system timezone MSK (that is, in the future) in the section "Post-Сhange Data" fields created & last_updated look right
Author
Owner

@kkthxbye-code commented on GitHub (Jun 24, 2023):

I cannot replicate this. I tried setting postgresql to 'Europe/Moscow' and TIME_ZONE to 'UTC' and everything was displayed correctly. You will need to provide proper replication steps if you want anyone to look at this, however in all likelihood it's a configuration error outside netbox.

@kkthxbye-code commented on GitHub (Jun 24, 2023): I cannot replicate this. I tried setting postgresql to 'Europe/Moscow' and TIME_ZONE to 'UTC' and everything was displayed correctly. You will need to provide proper replication steps if you want anyone to look at this, however in all likelihood it's a configuration error outside netbox.
Author
Owner

@martinum4 commented on GitHub (Jun 25, 2023):

date/time in netbox/configuration.py TIME_ZONE = 'UTC'

maybe you should select the right timezone there too and see if the error persists

@martinum4 commented on GitHub (Jun 25, 2023): >date/time in netbox/configuration.py TIME_ZONE = 'UTC' maybe you should select the right timezone there too and see if the error persists
Author
Owner

@sk011 commented on GitHub (Jun 25, 2023):

date/time in netbox/configuration.py TIME_ZONE = 'UTC'

maybe you should select the right timezone there too and see if the error persists

UTC is recomennded timezone and in one section i have correct time in second section error

@sk011 commented on GitHub (Jun 25, 2023): > > date/time in netbox/configuration.py TIME_ZONE = 'UTC' > > maybe you should select the right timezone there too and see if the error persists UTC is recomennded timezone and in one section i have correct time in second section error
Author
Owner

@sk011 commented on GitHub (Jun 26, 2023):

maybe error after change system OS timezone
1 install clear netbox on UTC timezone
2 change system timezone

how clear cache & reinstall all requirements ?

@sk011 commented on GitHub (Jun 26, 2023): maybe error after change system OS timezone 1 install clear netbox on UTC timezone 2 change system timezone how clear cache & reinstall all requirements ?
Author
Owner

@DanSheps commented on GitHub (Jun 26, 2023):

@sk011

Could you please provide clear steps for us to reproduce this, including any changing of:

  • System Timezone
  • Netbox recommended timezone
  • PostgreSQL relevant settings
  • User preferences
@DanSheps commented on GitHub (Jun 26, 2023): @sk011 Could you please provide clear steps for us to reproduce this, including any changing of: * System Timezone * Netbox recommended timezone * PostgreSQL relevant settings * User preferences
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#8233