How to get the date and time of visible view



I want to get the current time of the visible view. I have create a little snippet here using scheduler.getState().date, but this does not give the right date-time.
I have added a button ‘Show date’ to find the current date-time of the visible rectangle.
Is there a way to get that time?




You got Tue Jun 30 2009 00:00:00 GMT+0300, because the same date set in the scheduler.init(). If you swith to the next time range by “next button”, you will get the min date of the current view.
Which time do you expect to get?



I want to get the time of visible rectangle top-left. In this examples 8:00.