Invalid FullCalendar Time Zone

I have already installed;

var calendar = $('#calendar').fullCalendar({ axisFormat: 'HH:mm', timezone:false, ignoreTimezone: true,... 

So, I expect it to use the current local time settings, but it is not. When I select the time on the calendar, the date of the event of the object is 2 hours ahead. I think because my time zone is UTC + 2, but I don’t want it to add anything. I want whatever I select on the calendar .. that’s what it looks like .. (I choose Monday 23:30 pm, but event date: Tuesday, 01:30) enter image description here

I see the browser that this object (Moment) has the _isUTC: true property .. I think this is my problem, but how can I set it to false?

+5
source share
2 answers

You can set the local time zone in your full calendar configuration.

 timezone:'local', 

It works!

+11
source

Instead of using "time zone:" local ", sometimes you can use" moment.local () "in the exact moment object to set the" isUTC "flag as dynamically dynamically.

+2
source

Source: https://habr.com/ru/post/1244647/


All Articles