Getting myself in knots on calendar component time zones

Hi
I dont know if I can explain my problem very clearly, but I seem to be getting myself in knots with the calendar componet and local and utc etc.

I thought I had it all working fine but then find bugs in what i am doing.

Basically we work in one time zone (madrid, cet). My host server is in UK on UTC.

I have my calender view set to local, which is all good, the NOW arrow/line indicator tracks the time etc.

If I click date click and enter an event the event is entered correctly and has the right date and time.

but, if I then event drop or event click the events are going back to utc and are 2 hours from where they should be.

I just wondered if there is some standard way to do things, i.e store ALL events at server time utc, so any time we enter an event or drag an event its stored utc, then when we show the events we show local etc, if that is the best approach is that possible, i see in dynamic picker to set datetime to utc but not one to set local

just wondered what others are doing as I know I wont be unique in this, but just prob unique in being too stuipid to quite understand the best approach lol

thanks

It sounds like you are on the right path.

I go with store everything in UTC and let the formatters convert to local. Also make sure your server, your db server, and the db connection properties are set to UTC.

And given there have been a lot of front end changes to app connect, report any bugs you might find.

will give that a try and try to get everything in as utc. you sat let the formatters do it, so you think if events are stored utc the formatters will know my time zone is +2 and show it correctly, i.e if i put an event in at utc 7am, and my calendar is set to local, that event should show at 9am for me.

guess have to try, but i do keep getting in a knot and not getting things showing correctly.

cheers

the other trouble i find and think why i struggle is my dev server is my laptop which is not utc, so i get it working on my laptop then move it live and of course thigns seem to move lol

i think i can explain the problem i face.

I have my local calendar set to local, as i need it to show local time pointer etc.

if I click date click, that opens my model which i have 2 form fields, start date and endate.

the start date i populate from the date/tiime clicked, and, this gets set to local time as the calendar is local, i then use the daetpicker tool on the input box to select the end date and time. the time i click on sets the start date to local, even if the form field is set to utc, and, the end date is utc

so it seems the form field is ignoring the utc flag set on the startdate form field and uses the time selected from the date picker, which sort of makes sense, but, then i use the adet picker to enter my end time with date and time and no matter what i enter it sets it to utc time, so can end up a couple hours behind the start time.

if i set the enddate and startdate to NOT use UTC, i can enter and click edit events no problem, times stay as I set them, BUT, if I then drag an event it goes back to UTC and it wrong.

How do I set the drag event to use a local time, i think once i can figure that out it wil all be ok, and everything is set to local time. tried making everythign utc but that just doesnt work when calendar is set to local and you click a time evne with form field set to utc it goes local time

cant win for losing. there like needs to be a master flag for everything local or everything utc

is there a way to make the drag event use local like .local() or something

thanks

seems not only one experiencing this, just foudn this bug report

can also confirm this fix

I’ve come up with a workaround for this:
add 0 hours/days/minutes/etc. to your time.

This seems to bring it back to local time.

does work, but this must be a bug.