Moving mark_now

The mark showing the current time works only under the assumption that the timezone of the calendar is the timezone of the viewer. If I view the calendar in another timezone, I would need to move the now marker. I wonder: is there a way to move the marker?

I just wondered what you think about this.

I have several ideas:

  • hide it when the timezone differs
  • add an event that is at the current time and style it differently.

See also:
https://docs.dhtmlx.com/scheduler/api__scheduler_mark_now_config.html

Hello @niccokunzmann,

I tried to reproduce the issue with incorrect mark_now position with different timezones by the following link:
https://open-web-calendar.hosted.quelltext.eu/

After I changed the local timezone on my PC - the position of mark_now was correctly changed, here is a screencast:

Kind regards,

Thanks @Siarhei!

I can clarify this: Yes, it works with the local timezone.

What I would like to make work is this example where you can choose to change the time zone:


Since I am looking at it from London time, I would like the mark to be also just after the breakfast time when I view it from the timezone of people in New York which would be the time I am at in New York.

Basically, I would like to move the Now Mark to a specific time and date that I determine as the Calendar Hoster.

Thanks for your reply!

Hello @niccokunzmann,

Oh, thank you for the clarification. So the idea is to show the marker on the same time for all users. In this case, you can manually set the time for marker:

scheduler.config.now_date = new Date(2023, 0, 17, 8, 42 );

So it will be displayed at the same time, regardless of the timezone. In order to make it dynamic after setting it, you can re-update it using something like setInterval, for every few minutes(or any other time range).

Kind regards,

1 Like