[ZBX-5939] "now" in time/calendar popups uses browser localtime Created: 2012 Dec 04 Updated: 2017 May 30 Resolved: 2016 Jul 06 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.0.4rc1 |
Fix Version/s: | 2.2.14rc1, 3.0.4rc1, 3.2.0alpha1 |
Type: | Incident report | Priority: | Major |
Reporter: | richlv | Assignee: | Unassigned |
Resolution: | Fixed | Votes: | 2 |
Labels: | calendar, timezone | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Issue Links: |
|
Description |
when "now" is clicked in time/calendar popups, it goes to "now" as per localtime of the browser, which is totally incorrect if a different timezone is used on the frontend side (Apache/PHP). |
Comments |
Comment by Janne Enberg [ 2014 Feb 17 ] |
Currently for the frontend to work right you'd need to have both the server and the clients configured for the same timezone, which is just not going to happen with different people from all around the world accessing it. There should be some timezone correction logic when communicating between the server and the client. It is not super simple to do, but it's not very difficult either. One solution is to calculate the difference between UTC and local time in seconds on the server, and on the client, then taking the difference between these UTC offsets and applying it to all times on the client. http://www.php.net/manual/en/function.timezone-offset-get.php |
Comment by richlv [ 2014 Oct 03 ] |
zalex_ua It doesn't, IMO. |
Comment by Oleksii Zagorskyi [ 2015 Sep 21 ] |
CONFIRMED, including for upcoming 3.0 |
Comment by Oleksii Zagorskyi [ 2015 Nov 09 ] |
Just a note - to quickly test a browser in a different time zone without changing system's settings.
# TZ='Australia/Sydney' opera
Available timezones can be selected using "tzselect" command line tools. |
Comment by richlv [ 2016 Feb 15 ] |
ZBX-4437 is related |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jul 06 ] |
Fixed in: pre-2.2.14rc1, pre-3.0.4rc1, pre-3.1.0 under Fix was made in a way that new Date() was replaced with new CDate() in class.calendar.js . If we want synchronize timestamps it can be implemented in CDate class that will effect time in all zabbix frontend. |
Comment by Oleksii Zagorskyi [ 2016 Jul 06 ] |
I can confirm the fix of current issue, using Opera on Linux. |
Comment by Dmitry Verkhoturov [ 2016 Jul 06 ] |
2.4 affected as well, didn't it got a fix? |
Comment by Oleksii Zagorskyi [ 2016 Jul 06 ] |
Dmitry, branch 2.4 is not supported anymore, it will not get any updates. |