Page 1 of 1

sometimes current time wrong

PostPosted: 08 Apr 2016 14:22
by gbh100
The current time line that shows on the current day is sometimes ahead one hour, but not always. I am using Chrome as a browser and we are in the Eastern Time Zone, New York & Toronto. We are currently in Daylight Savings Time as we changed clocks in March, but the problem existed before that too. I haven't been able to determine why and this is not something that I set. Any thoughts?

Re: sometimes current time wrong

PostPosted: 08 Apr 2016 16:15
by Alexander Bulei
Hi gbh100,

Can you reproduce this problem in simple testcase project?

Best Regards.

Re: sometimes current time wrong

PostPosted: 17 May 2016 16:49
by gbh100
I was creating a test case and was able to narrow the issue. It has to do with changing the StartHour from what the scheduler had on creation. I do this in my application as I only look at a single day and I have the StartHour and EndHour represent a stores opening and closing. When I do an AjaxRerender on the scheduler the current time is recalculated on the original StartHour and not the current one. Is this a bug or is there something that I can do to have the current time recalculated on the new StartHour?

Re: sometimes current time wrong

PostPosted: 19 May 2016 18:35
by Alexander Bulei
Hi gbh100,

Any screenshot or better, video to show us?

Best Regards.

Re: sometimes current time wrong

PostPosted: 19 May 2016 20:19
by gbh100
Here is a sample app. When you press the Rerender button the calendar will be redrawn and then a few seconds later the time will advance one hour.

Re: sometimes current time wrong

PostPosted: 20 May 2016 13:28
by assapan
Hi, the problem seems to be in the javascript procedure realodTime = window.setInterval(function () {
but i can't understand why so far !

Re: sometimes current time wrong

PostPosted: 20 May 2016 14:19
by assapan
Hi alex,
I found a solution for this problem in jquery.calendar.js , it is due to realodTime interval procedure which is not reloaded after a ajaxrerender due to
Code: Select all
(typeof realodTime == "undefined")
so procedure is handling options.startHour not reloaded.

what i did ( maybe not the best way )
Code: Select all
         
            if (typeof realodTime != "undefined") {
                window.clearInterval(realodTime)
            }
/*            if (typeof realodTime == "undefined") { */
                realodTime = window.setInterval(function () {

Re: sometimes current time wrong

PostPosted: 20 May 2016 14:21
by Alexander Bulei
Hi assapan,

Yeah, I found it too ;)
I will fix and commit for next build.
Thanks ;)

Best Regards.

Re: sometimes current time wrong

PostPosted: 20 May 2016 14:22
by gbh100
Thanks