New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timezone issue #352
Comments
This appears to be an issue with Apple iCal. The attached file appears to be ok, so could only suggest to check the timezone settings on the Apple device. |
I resolved the issue by adding timezone to dtstart and dtend:
This seems to make it easier for apple calendar. I would like to propose that this is the default behaviour, if time zone was set? |
Ah yes sorry I missed that. In fact you shouldn't have the Instead you must explicitly set the timezone on the date-based property, otherwise it will be treated as "floating" time and will assume the local timezone wherever it is used. Because floating time is a valid option, we don't automatically set the timezone on date-based properties. |
But isn't this the 99% use case? What is the use case for floating event times? |
Actually in some cases it will automatically set the timezone parameter, but not with the String-based constructor you just described. You didn't share the original code so I can't comment on that, but you should try this (assuming start date is a java.util.Date):
|
I used this code:
|
Ok so the problem is that java.util.Date doesn't encapsulate the timezone, so even though you are setting it on the java.util.Calendar instance, the date resulting from startDate.getTime() has lost the zone information. Ideally the The best workaround right now is to use the DateTime constructor with string and timezone as arguments: ps. i can add some more convenience constructors to DateTime to support calendar instances, should make it a little easier. |
Thanks for clarifying this, I will look for a place in the wiki (?) to add an example for this! |
New DateTime constructor included in 3.0.10 release |
Describe the bug
Google Mail/Calendar: Time in ICS file is correct (MESZ)
To Reproduce
Add appended ICS file to apple calendar
Expected behavior
Time zone is correctly used
Actual result
2 hours difference in appointment start date within apple calendar.
Appointment should be from 3 to 4 PM, but in apple calendar it is from shown to be from 5 to 6 PM.
What is the preferred way of making the time zone works correctly on as many as possible devices?
testappointment.ics.zip
The text was updated successfully, but these errors were encountered: