[ZBX-10619] Zoom scroll start time problem with End of month Created: 2016 Apr 05 Updated: 2017 May 30 Resolved: 2016 Jun 16 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Frontend (F) |
Affects Version/s: | 2.2.11, 3.0.1 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Kim Jongkwon | Assignee: | Unassigned |
Resolution: | Duplicate | Votes: | 0 |
Labels: | frontend, zoom | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Google Chrome 49.0.2623.110 (64-bit) |
Attachments: | 2016-03-30 11.00.45.png ZBX-10619.png ZBX-10619_3rows.png | ||||||||
Issue Links: |
|
Description |
“February 29”, also known as “leap day” or leap year day. Step to Reproduce: In this case, I confirmed Zoom module’s starttime was “Mar.29”. and April 1 is fine. Please check the attached file. + Additional information Please see the comments below : |
Comments |
Comment by Oleksii Zagorskyi [ 2016 Apr 05 ] |
I'm not sure, but I have a feeling that it could be related to Kim, is this reproducible only if you play with the Leap day ? vitalijs.cemeris Seems that this issue is not related. |
Comment by Kim Jongkwon [ 2016 Apr 05 ] |
Oleksiy, Oh, Thanks. I didn't know that issue. So I checked play with more rows. I added more screenshot now. then now... I think 2 issue was different. |
Comment by Oleksii Zagorskyi [ 2016 Apr 05 ] |
Kim, thanks ! |
Comment by Kim Jongkwon [ 2016 Apr 06 ] |
Oleksiy, Thanks! |
Comment by Kim Jongkwon [ 2016 Apr 07 ] |
I play with more this problem, and I confirmed that there are more problems with some other days. If your data from 2/29, set the clock change… ・Data started “2/29” - Set the clock “3/29” = OK ・Data started “2/29” - Set the clock “3/30” = WRONG (UI says, from 3/29) ・Data started “2/29” - Set the clock “3/31” = WRONG (UI says, from 3/29) ・Data started “2/29” - Set the clock “4/29” = OK ・Data started “2/29” - Set the clock “4/30” = WRONG (UI says, from 3/29) ・Data started “2/29” - Set the clock “5/29” = OK ・Data started “2/29” - Set the clock “5/30” = WRONG (UI says, from 3/29) ・Data started “2/29” - Set the clock “5/31” = WRONG (UI says, from 3/29) In these cases, There's a possibility of this trouble may come “EVERY end of Month” (Actually, over 30~) And more, Data started time change… Jan ・Data started “1/29” - Set the clock “3/30” = OK Feb (Leap year) ・Data started “2/1” - Set the clock “3/30” = WRONG (UI says, from 3/1) ・Data started “2/2” - Set the clock “3/30” = WRONG (UI says, from 3/2) ・Data started “2/11” - Set the clock “3/30” = WRONG (UI says, from 3/11) ・Data started “2/22” - Set the clock “3/30” = WRONG (UI says, from 3/22) ・Data started “2/28” - Set the clock “3/30” = WRONG (UI says, from 3/28) ・Data started “2/29” - Set the clock “3/30” = WRONG (UI says, from 3/29) Mar ・Data started “3/29” - Set the clock “3/30” = OK ・Data started “3/29” - Set the clock “4/30” = OK Feb (2015) ・Data started “2/28” - Set the clock “3/31” = WRONG (UI says, from 3/28) So, I think there is a strong possibility that from All day of the February. |
Comment by Kim Jongkwon [ 2016 Apr 12 ] |
Added : This 'Feb' start time changed to 'Mar' problem is possible to reproducible on Zabbix 3.0.1. |
Comment by Kim Jongkwon [ 2016 Apr 15 ] |
(2016/4/15 Issue title changed. ‘February’ -> ‘End of month') Sorry I'm a stranger here. I checked source and finally I feel like understand that. When the day value is greater than the maximum number of days in the month passed to setMonth() in setZBXDate. I added javascript debug screenshot & explain comments below : source : frontends/php/js/class.cdate.js - 147~149 lines (Zabbix 2.2.11) this.serverDate.setFullYear(theDate.Y); //this.serverDate already have ‘2016-03-30’ this.serverDate.setMonth(theDate.m - 1); //set Month. this.serverDate is now ‘2016-02-30’. but ’02/30’ does not exist. so changed to ’2016-03-01’ this.serverDate.setDate(theDate.d); // set Day. this.serverDate is now ’2016-03-29’ … This is not limited to 'Feb’ start problem too. Actually, limited to “All day of the end of month” |
Comment by Kim Jongkwon [ 2016 Apr 20 ] |
Before to do set date in setZBXDate. It is necessary to check the day of month. I was just thinking to resolve the invert the position of setMonth() & setDate() at first view, but this solution has another problem with some other days. FYI : If you use 3.0, can be possible to reproduce ‘very first record time datas’ disappeared. This issue can't fix this problem. It could be related to |
Comment by Kazuo Ito [ 2016 May 13 ] |
In the case of Mar 31, it is set for 31 days in Feb. setZBXDate: function(strdate) { this.server = 1; var theDate = { Y: strdate.toString().substr(0, 4), m: strdate.toString().substr(4, 2), d: strdate.toString().substr(6, 2), H: strdate.toString().substr(8, 2), i: strdate.toString().substr(10, 2), s: strdate.toString().substr(12, 2) }; this.serverDate.setFullYear(theDate.Y); this.serverDate.setMonth(theDate.m - 1); <-- Feb. this.serverDate.setDate(theDate.d); <-- 31 this.serverDate.setHours(theDate.H); this.serverDate.setMinutes(theDate.i); this.serverDate.setSeconds(theDate.s); this.serverDate.setMilliseconds(0); this.calcTZdiff(); return this.getTime(); },
setZBXDate: function(strdate) { this.server = 1; var theDate = { Y: strdate.toString().substr(0, 4), m: strdate.toString().substr(4, 2), d: strdate.toString().substr(6, 2), H: strdate.toString().substr(8, 2), i: strdate.toString().substr(10, 2), s: strdate.toString().substr(12, 2) }; this.serverDate.setFullYear(theDate.Y); this.serverDate.setDate(theDate.d); this.serverDate.setHours(theDate.H); this.serverDate.setMinutes(theDate.i); this.serverDate.setSeconds(theDate.s); this.serverDate.setMonth(theDate.m - 1); <-- here! this.serverDate.setMilliseconds(0); this.calcTZdiff(); return this.getTime(); }, |
Comment by Kim Jongkwon [ 2016 May 13 ] |
Thanks to fix code. I said this before,
Sorry for the lack of explanation. I was confirmed "~ ENDTIME(now!)" was changed to 'before’ on end of month. |
Comment by vitalijs.cemeris (Inactive) [ 2016 Jun 16 ] |
Closed as duplicated by |