Calendar Entries - Scheduled Time One Hour Later Than Set

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.0.1.48
HARDWARE (XA2, Xperia 10…): XA2
UI LANGUAGE: English
REGRESSION: (compared to previous public release: Yes, No, ?): Not Known

DESCRIPTION:

Whatever time you set when creating a new calendar entry then appears in the calendar one hour later. So, for example, if you create a new event for 18:00 to 19:00 it actually appears in the calendar as 19:00 to 20:00. This is not a display issue since if you look at the same calendar on another device (e.g. my iPhone 12 mini) it also appears as 19:00 to 20:00. Its also not a time zone issue as all the calendar apps on all my devices are set to the same UTC.

PRECONDITIONS:

  1. Microsoft Exchange Calendar used - I do not know if using other types of synchronized calendar make any difference as I do not have any other types.
  2. Time zone set to UTC
  3. Create an entry at any time of day - either am or pm does not matter

STEPS TO REPRODUCE:

  1. Open the Calendar app
  2. Create a new even starting at a particular time
  3. Save the event
  4. Even then appears in calendar exactly one hour later than scheduled

EXPECTED RESULT:

Event appears in the calendar at the scheduled time

ACTUAL RESULT:

Event appears one hour later than scheduled

ADDITIONAL INFORMATION:

(Please ALWAYS attach relevant data such as logs, screenshots, etc…)

1 Like

Yes - I have here the same problem with 3.3.x and when synchronizing it - It is odd :confused: - on the other side it is shifted

I’m trying to reproduce your issue but without success at the moment. How do you set the time zone to UTC ? Is it for the device, or for the calendar in a web interface ? If for the device, in the settings, I can choose automatic time zone, but then it will be the time zone where I live, or I can choose it manually, but UTC is not part of the list. Actually UTC is not even a time zone.

If I’m creating an event in the calendar and choose UTC as a time definition, then the event is actually displayed with a time shift of +2 because my device is using a UTC+2 time zone. Let say that I’m creating an event at 18.00 UTC, the event is displayed as happening at 20.00 local time in the month view, but if I edit it, it will display 18.00 UTC, because 18.00 UTC and 20.00 local time are actually the same, but since the event was created in UTC, the modification is proposed in the same time definition. This is actually like that by design. But I don’t think this is your issue.

I don’t set the timezone to UTC, that’s what it appears as in the calendar entry. My Sailfish XA2 is set to, in settings, United Kingdom time automatically because that’s where I live. I’m sure its something to do with the Exchange calendar synchronisation, because if I create a purely local calendar on the device itself all is fine and the actual timezone in the calendar entry then comes up as United Kingdom Time. I have an Office365 Exchange account and this synchronises with my Sailfish phone, my iPhone 12, my iPad, and a Linux (Elementary OS) desktop running the Hiri email/calendar client. On all of the devices, except the Sailfish XA2 the synchronised calendar entry has the right time, on the XA2 it is an hour later. In addition, if I have an all-day event for, say, a Tuesday then on the Sailfish phone it shows the event for two days - Tuesday and Wednesday. I suspect that this is the same problem as its added an extra hour which takes it past midnight on Tuesday and into Wednesday.

As an example, just created a test event for today 2:00pm to 3:00pm:

but then when I save it and look at in the calendar I get:

I might also add then when I receive calendar invites from other people, also on Exchange but not necessarily Office365, these are also an hour out - which has caused a rather embarrassing late turn up for a meeting before I realised this was happening!

Why does the app show UTC as time zone while your SFOS is set to local time?

With me, the calendar app shows the time zone i have chosen. Does the time zone change when you switch between the calendars (i.e. Exchange calendar and device calendar)?

Thanks for the reply and the explanations. I trust you get the issue, but I’m trying to figure out where it can come from.

  • with the “local” calendar you don’t have the problem. Good.
  • with an Exchange calendar you are getting it.

What is puzzling me is that the event is first saved on device before being synced to the server and corrupted in the process. Just saving the event follows the same process, as far as I know, for local calendar and shared ones. So you should be able to see it on the right time just after saving it, before it is synced. A sync is triggered some seconds after every save on device. In the Exchange account setting on device, can you disable for a test the “always on sync” option ? It’s the one that is under the bidirectional option (well, in fact I don’t know for exchange because I don’t have any exchange account myself). Then you should see the event with the right time on device and then trigger a manual sync and notice the time shift.

If that’s the case, I’m sorry, but the Exchange synchronisation code is proprietary and cannot be looked at by community :frowning: One should kindly ask @flypig for that matter.

If it’s not the case, then, I need to re-read carefully the QML binding code that is saving the event because I’ve no idea where the kind account is taking place there…

I have no idea. As @dcaliste says there is no UTC in the timezone settings on Sailfish. I can only assume its coming from the Office365 server once the calendar entry has been saved (and then presumably synchronised with the server).

To me the behaviour illustrated by the latest screenshots looks very correct.
Make a booking in UTC, and it shows up in BST when viewed plainly, which indeed is UTC+1.
How is that wrong?

Why the phone and server disagrees about which timezone they are speaking about… that is probably the real issue at play.

Oups, sorry, thank @attah : that’s the correct behaviour on device : the time of event is always displayed in the time zone of the device, even if saved in an another time zone, or time reference.

What may be an issue in the synchromisation code is if this event is seen by the other devices as an event occurring at 15.00 UTC.

I just ask myself (an edited my question above accordingly) whether the time zone changes when switching between the calendars. Such change of time zones should not occur, in my view. I recall, however, that I was running in similar problems when importing .ics files with time zone information. Some data apparently was misinterpreted during import.

Except that I am not explicitly making a booking in UTC (or not that I know of). I’m not selecting any different time zone over the default (presumably United Kingdom Timezone) when I create the calendar entry. In fact I don’t touch that field at all. Its only when you go back into the entry after seeing that the time has changed by an hour in the calendar that you see the time zone has changed as well - so I guess it must be something to do with the synchronisation.

It comes down to the question how the time zone for the different calendars is set

@Steve_Everett may I ask you a bit more detailed step by step reproducer in your case. Is it :

  • open the calendar app,
  • pull down menu “create a new event”
  • fill up fields like summary…
  • choose 14.00 as a starting time, check that the time zone selector for the event is set on UK time
  • choose the Exchange account as a calendar, check that the time and time zone is still set on UK at 14.00,
  • save.

Then later on :

  • notice that the event is scheduled at 14.00 in the month view,
  • let the synchronisation run or run it manually,
  • notice that the event is now set at 15.00 in the month view,
  • select it and modify it, notice that the starting time is (still) 14.00, but the time zone selector is now set on UTC.

Is it correct or do you want to amend some parts ? In particular, at each step, when possible, mention if the event was created on device or is coming from server and modified on device, what is the time and the value of the time selector (in the modification page).

In fact I didn’t even realise you could change the timezone field in an individual calendar entry (no criticism of my skills please!). So … now I know you can change this field I have gone back into the Test event and edited the timezone to be United Kingdom and it now displays the correct time (i.e. the 2:00pm to 3:00pm I set the calendar entry to in the first place. Now I sort of expected it to be resynchronised and the other devices (iPad, iPhone, etc) would show the event an hour earlier now, but they don’t; the also still display the correct time. However, once you have changed the timezone in the calendar entry back to UK you can’t then change it (not that you’d want to of course) back to UTC by selecting this in the drop down list because it doesn’t exist.

you can’t then change it (not that you’d want to of course) back to UTC by selecting this in the drop down list because it doesn’t exist.

Strange, there should be two entries at the top of the list :

  • “no time zone”,
  • “Universal time coordinated UTC”

Then comes the real time zone list. I agree that the search field is not helping because the two additional above entries are not part of the actual list, and thus typing “UTC” will bring nothing… This is due to a quick hack when I implemented this, I didn’t want to bother to actually change the model and just inserted two entries as a “header” for the list…

Ok, my sync is always up to date and bi directional. I’ll put the phone into airplane mode so that it can’t contact the server and we’ll see what happens when I create a new entry.

Airplane mode selected.

  • open the calendar app, - yes

  • pull down menu “create a new event” - yes

  • fill up fields like summary… - yes

  • choose 14.00 as a starting time, check that the time zone selector for the event is set on UK time - yes, but I never really bothered looking at this before. I just assumed it would default to whatever timeszone my phone was in.

  • choose the Exchange account as a calendar, check that the time and time zone is still set on UK at 14.00, - yes, but this particular calendar (my company calendar is the default one so I don’t actually set anything here).

  • save. - yes

Then later on :

  • notice that the event is scheduled at 14.00 in the month view, - yes, and the timezone is still set to UK.

Airplane mode off

  • let the synchronisation run or run it manually, - Yes

  • notice that the event is now set at 15.00 in the month view, - Yes !!

  • select it and modify it, notice that the starting time is (still) 14.00, but the time zone selector is now set on UTC. - Exactly!

Ok, @Steve_Everett , the description and reproduction is clear for me now. But sadly, I cannot do anything about it because the culprit seems to be the Exchange Buteo plugin responsible for the synchronisation. And I don’t have access to this code. I’ll talk with @flypig from Jolla though about it and I’m sure he will find the issue when he will have time to look after it.

The fact that your calendar is set to use UTC on server leads me on two possibilities that are rather simple to look at :

  • the event is sent to the server with a time zone (UK here) that is mis-interpreted by the server and the server is keeping the time of the event and set it to UTC (its own time definition),
  • or the event is properly unserstood by the server, but the event is sent back with a format for the time zone that is mis-interpreted by the plugin.

Since you say (am I right ?) that the event is also shifted on other synced devices like the Iphone, I think the most probable reason is the first one. Which reduces the places to look at in the code. But once again, I don’t have access to it, so it may be more complicated to solve than that.

Well, at least I know I can now go back into every calendar entry I create and change the timezone back from UTC to UK so that it does at least appear correctly in the normal calendar view.

Although sadly I don’t think this this ‘workaround’ will also work for calendar invites I receive from others as you can’t edit those type of entries (presumably because they’ve come from the meeting organiser they’re the only ones who can change it).

Thanks anyway.