Vivaldi Calender setting event one day earlier
-
@nedinisj
Hm, Google calendar on mobile:I don´t use the Google calendar anymore just for testing, maybe an other user steps by for a test.
Cheers, mib
EDIT: Leave it for today, I know myself how frustrating fiddeling with software can be.Cheers, mib
-
@nedinisj Sorry to hear about your frustration with using Vivaldi Calendar, we aim to please not frustrate.
It is not totally clear to me from your description exactly what the problem is. I gather you have set up an online calendar account and it is being synced to / from Vivaldi. And then if you create a calendar item in Vivaldi it will show up in other applications at a wrong date?
Could you please give more details on your setup and where the error shows. Like f.ex.
- what type of account you have setup in Vivaldi?
- to which server?
- steps you take to create the problematic events.
- and since this is a time offset related problem timezones may be involved. Which timezone is set on the problematic items, do they match the timezone in other applications? (Are the timed events a whole 24 hours off?)
This is not a known issue for us and any feedback you can give to help figure this out is valuable to us so thanks in advance for your time spent on helping us make a better product.
-
Hello, I have the same problem
If I create an appointment in the Vivaldi browser, it will be transferred correctly to Vivaldi Webmail, only in the cell phone (Collection A21s; Android 12; Samsung Calendar App) the appointment is displayed the day before at 11 p.m., the time is always 11 p.m. no matter what is entered in the appointment.
Vivaldi browser:
Vivaldi Webmail:
Samsung Calendar App:
-
Well I figured it out. What I needed to do to rectify the issue was to select the specific time zone in the vivaldi rather than using "Always in Local Time".
Not sure why the error came up but took me some time to figure out the simple fix.
-
Yes worked for me too
-
Summary: when serializing iCalendar data, timeless
DATE
values must be formatted in UTC, especially if the local time zone has a negative UTC offset.
Hello,
I agree that it's a time zone issue. I have been encountering this issue with all-day events for a while, but only just spent the time to figure out what was happening and how to fix it. It may not be exactly the same symptoms as other folks but I believe it's the same root cause.
Problem
Updating any properties on an all-day event sends a PUT request to my CalDAV server, and the
DTSTART
andDTEND
fields in the iCalendar request body have the wrong values (one day too early).The start and end dates for all-day events are represented in Vivaldi as numeric milliseconds values. At serialization time, these are parsed into a Moment object and then formatted with the
YYYYMMDD
pattern.Unfortunately, the time zone for these dates is being used inconsistently by Vivaldi. Since all-day events are timeless and therefore zoneless, using milliseconds since the Unix epoch to represent them means that they only align with the start of the day (midnight) in one particular time zone. Vivaldi has already converted these millisecond values so that they align with midnight when interpreted in UTC, but the iCalendar serializer formats them in the local zone instead of UTC, leading to the wrong
DTSTART
andDTEND
values.The problem occurs when the local time zone has a negative UTC offset. Converting a date at midnight from UTC to America/Los_Angeles (-0700) decrements the day of the month. However, the problem won't reproduce for people in UTC or positive offset zones, because there is no positive zone offset large enough to change the day of the month.
Solution
I changed the
eventsToICalendar
function inbundle.js
to first enable UTC mode by calling.utc()
on the Moment objects before formatting them:// Vivaldi 5.5.2805.32 stable bundle.js:eventsToICalendar() e.allDay ? (c = ";VALUE=DATE", r = `${E(e.start).utc().format(b.O5)}`, // added .utc() l = e.end && E(e.end).utc().format(b.O5), // added .utc()
This fixed the issue on my computer. With this change, you don't have to use the above workaround of manually setting the time zone on every event you create.
There may be some additional calls to modify to fix Tasks, although I haven't looked at those too closely yet since they're so new. I also didn't touch the serializer code for non-all-day events since those always worked fine for me, even when the start time is close to midnight. If there actually is a problem with non-all-day events, I think the solution is probably of the same form and in the same function.
I really hope this is helpful to someone, or at least makes sense. Let me know if this needs any further details or an official issue to be filed.
Thanks for all the great work on calendar and mail, Vivaldi team!
-
@aldaviva this is a pretty detailed analysis. Since this is a user forum the devs do not participate very regularly. Could you please write a bug report about your findings and note the bug number here?
-
@WildEnte no problem, filed
VB-92253
. -
Thanks a lot @aldaviva. Since my nextcloud seemed to show the correct date, I was not certain if this was a vivaldi issue or rather an issue with DAVx5. Hope that I will no longer receive notifications at 1 AM, soon
-
@aldaviva Thank you for the very detailed bug report.
I have confirmed that your findings are 100% accurate and indeed there were also related issues in some other cases. This was all thoroughly unit tested in our code but unfortunately there was a small detail wrong with the tests so they didn't catch it.
And with us who are working on the calendar situated in a timezone which follows UTC time all year round we are a little handicapped when it comes to timezone and DST related things. We do try to test everything in both + and - offset timezones but manual testing will always be lacking. Not that I'm trying to make excuses for such issues, it is just something that I've always considered a nice thing (to not have to worry much about these brain bending things that are time offsets) is now a disadvantage.
Anyway, a fix for this issue has now started its' journey into Vivaldi code. Coming to a release soon.
Thanks a bunch for testing and spending the time to dig into it, much appreciated.
-
@nedinisj I believe the source of your troubles with event times all over the place was a mix of the same issue as @aldaviva had with timezones, plus there was an additional bug with events having "Always in local time" set, causing them to jump also in Vivaldi locally. BTW, not sure if it is immediately obvious but that option should create an event which is shown at the same local time, no matter where in the world the calendar is viewed. Event at 11:00 will show at 11:00 whether you are in New York or Calcutta.
Both the issues should be fixed with the above mentioned change. I do hope you find Vivaldi Calendar useful and it can continue to make your life that little bit better.
-
@aldaviva said in Vivaldi Calender setting event one day earlier:
spent the time to figure out what was happening and how to fix it
Given @eggert 's reply I nominate @aldaviva' s contribution for the not yet existing forum post of the month award. Furthermore I suggest to have a "forum post of the month" award
-
@eggert You're very welcome, I'm glad it was helpful! It's really exciting to be able to contribute something back to the browser I love.
I also work on a product that handles scheduled meetings and I've seen many (and caused a few) time zone and DST issues over the years, so it's no surprise when it rears its head again. But anything that helps add to or improve a test suite is valuable progress, even if we can never truly cover 100% of cases for such a complicated problem.
-
The fix for VB-92253 has been released in Vivaldi 5.6.2867.36 Stable today. It is working well for me so far, without any of my own earlier file modifications.
Thank you again @eggert and the whole Vivaldi team!
-
@aldaviva Great! Thanks again for the excellent report.
-
@eggert I have a similar issue but when using Open Sync for syncing Vivaldi calendar to mobile. Event is synced into mobile (Android) via Open Sync (from Play store), but the date is wrong, one day early and 23.00. Tested with calendar apps Etar and Google's calendar on Android. Appears when adding and syncing new events for today or Monday. Strangely enough, at least one event further in the future, April 2023, was timed correctly. Timezone is the Vivaldi calendar default offered to me, Current (Europe/Helsinki), same with manually set Europe/Helsinki.
I think I found instructions to use Open Sync on Vivaldi site help on the mobile, but now cannot seem to find it again. In case it's something wrong with Open Sync and not instructed here to use Open Sync, this might be not relevant to Vivaldi. Maybe should use some other sync app if that's the case.
Update: Some other hits on Open Sync,
a previous report of a similar problem:
https://forum.vivaldi.net/topic/76875/calander-events-in-browser-different-than-web-calendara note to not use Open Sync and not tell people to use it saying it's a bad fork and use another software instead, from 2017 though so not sure if current:
https://forum.vivaldi.net/topic/20651/vivaldi-mail-caldav-e-cardav/6?_=1671211227077Anyway, might be best to try and use some other sync app.
Another update: installed the app mentioned in the 2017 message, but unfortunately it has the same issue, so the problem persists.
Yet another update, a workaround: if I set the time zone to be always the local time, the event is placed correctly.
On Ubuntu, browser version vivaldi-stable_5.6.2867.46-1_amd64.deb
-
@JyrkiKuoppala This sounds like some kind of timezone, or more specifically daylight savings, kind of issue. Might very well be on our side.
At the moment I am quite deep into some refactoring to improve performance and future proof our code. Will try to check up on this issue as soon as I have time.
-
@eggert Thanks - one more data point, most of the time now even with always local time, Android side shows the event two hours too early. Points maybe to time zone issues as Helsinki tz is two hours off GMT.
-
I had this time shift problem in the early days of mail / calendar - module.
Now, therefore, after reading this post, I tried it out to see if it will display correctly for me.
No, it won't. At least not for a full day event. I have a full day event set to Dec 24, 2022. On the smartphone and in the webmail - Vivaldi - calendar it shows up as an event on Dec 23, so 1 day early.
I am using the latest version of Vivaldi stable, 5.6.2867.50. However, the bug also exists in the latest Vivaldi snapshot, 5.7.2887.3.
-
I also see the problem mentioned by @JyrkiKuoppala in the latest version - 5.6.2867.58 (Stable channel) (64-bit).
Steps to Reproduce:
- Add a CalDAV calendar to Vivaldi.
- Create an event in the above CalDAV calendar for 16h00 choosing a specific timezone - e.g. Asia/Calcutta (UTC+0530).
- Wait for the refresh interval, or manually refresh the calendar.
- After successful refresh, the event jumps ahead 05h30 hours, i.e. the event time is now 21h30 instead of 16h00.
I do not see this behaviour if I originate the event using Thunderbird with the same CalDAV calendar.