[ZBX-18433] Clock widget: missing validation for the received time format Created: 2020 Sep 30  Updated: 2020 Oct 05

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 4.0.25, 5.0.4, 5.2.0beta1
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Sergejs Olonkins Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: clock, time, widget
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: GIF File wrong_time.gif    

 Description   

Problem description: No errors are thrown in case when the clock widget receives a timestamp with incorrect data format. Furthermore for some specific received values the widget starts showing time that is incorrect in respect to the timestamp sent to the widget.

For example such problem may occur if the user sets "Time type" parameter to Host time and selects an item with key "system.localtime" in field "Item" instead of "system.localtime[local]".

 

Steps to reproduce:

  1. Create a new dashboard
  2. Create 3 "Clock" widgets
    1. For the 1st widget set "Time type" to "Local time"
    2. For the 2nd widget set "Time type" to "Server time"
    3. For the 3rd widget set "Time type" to "Host time" and select "System local time" item (with key = "system.localtime") of Zabbix server in "Item" field
  3. Save the dashboard.

Result: Time on the 1st and the 2nd widget is correct, but the 3rd widget displays some random time (04:03 in the gif) or is shown as disabled.

Expected: the 3rd widget should return an error, because the timestamp format that was sent to the 3rd widget was incorrect.

 

Example of a timestamp for which the widget shows some random time = 1601465006

Example:


Generated at Fri Aug 29 23:17:32 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.