Horizon: AgularJS pages do not display dates in system's timezone

Bug #1832768 reported by Kristine Bujold
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack Dashboard (Horizon)
Fix Released
Low
hutianhao27
StarlingX
Fix Released
Low
hutianhao27

Bug Description

Brief Description
-----------------
Horizon's AngularJS pages (for example Images) does not display timestamp in system's timezone. The timezone used is the browser's.

Severity
--------
Minor

Steps to Reproduce
------------------
- If Timezone is not set under Settings (menu on the top right):
Set the controller's system timezone to a one different from UTC and the browser, for example "system modify --timezone America/Regina"
The Image timestamps (for example 'Created At') are displayed in the browser's timezone and not the system's timezone.

or

- If Timezone is set under Settings (menu on the top right):
Set Horizon's Settings Timezone to one that is different from UTC and the browser.
The Image timestamps (for example 'Created At') are displayed in the browser's timezone and not the Settings' timezone.

Expected Behavior
------------------
AngularJS pages should align with Django pages which use the timezone from the Horizon's cookie (which is set under the Settings menu on the top right), or if that is not set use the controller’s timezone.

Actual Behavior
----------------
The AngularJS pages use the browser's timezone.

Reproducibility
---------------
Reproducible

System Configuration
--------------------
Any configuration

Branch/Pull Time/Commit
-----------------------

Last Pass
---------
NA

Timestamp/Logs
--------------
NA

Revision history for this message
Kristine Bujold (kbujold) wrote :

This issue will be tracked with https://bugs.launchpad.net/horizon/+bug/1832771

Changed in starlingx:
status: New → Invalid
Ghada Khalil (gkhalil)
tags: added: stx.gui
tags: added: stx.distro.openstack
Changed in starlingx:
importance: Undecided → Low
status: Invalid → Triaged
Revision history for this message
Ghada Khalil (gkhalil) wrote :

This is still a valid bug for starlingx even if the issue is with the underlying horizon implementation. I don't think marking this as "Invalid" is accurate. That being said, we wouldn't consider this a gating issue for starlingx.

yong hu (yhu6)
Changed in starlingx:
assignee: nobody → Shuquan Huang (shuquan)
ya.wang (ya.wang)
Changed in starlingx:
assignee: Shuquan Huang (shuquan) → ya.wang (ya.wang)
hutianhao27 (hutianhao)
Changed in starlingx:
assignee: ya.wang (ya.wang) → hutianhao27 (hutianhao)
Revision history for this message
hutianhao27 (hutianhao) wrote :

I don't known why launchpad not auto update the fix patch's link. So I paste it here manual:
https://review.opendev.org/#/c/678175/

Revision history for this message
hutianhao27 (hutianhao) wrote :

I have a patch to solve this problem, but it needs someone to review it.(https://review.opendev.org/#/c/678175/)

Akihiro Motoki (amotoki)
Changed in horizon:
assignee: nobody → hutianhao27 (hutianhao)
status: New → In Progress
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to horizon (master)

Reviewed: https://review.opendev.org/678175
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=a464a94655471909b9f6d9f5b287b7a309862a80
Submitter: Zuul
Branch: master

commit a464a94655471909b9f6d9f5b287b7a309862a80
Author: hutianhao <hu.tianhao@99cloud@SH>
Date: Fri Aug 23 16:01:05 2019 +0800

    AgularJS pages display dates using Horizon's Settings Timezone

    Horizon's AngularJS pages (for example Images and Keypairs)
    display dates using browser's timezone now. This change makes
    AngularJS pages use Horizon's Settings Timezone instead of
    browser's timezone and if Timezone is not set under Settings,
    AngularJS pages will display dates in 'UTC' timezone.

    Closes-Bug: 1832768
    Change-Id: Ibbed19600bfe6b13c43b9f09fa484cb78524b0d6

Changed in horizon:
status: In Progress → Fix Released
hutianhao27 (hutianhao)
Changed in starlingx:
status: Triaged → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/horizon 17.1.0

This issue was fixed in the openstack/horizon 17.1.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.