Closed meitonga closed 8 years ago
Hmm, i cannot upload files.
So here is the debug output:
BackendCalDAV->_ParseVEventToAS(): Parsing VEvent
TimezoneUtil::getMSTZnameFromTZName() no MS name found for 'Europe/Berlin'. Returning '(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London'
TimezoneUtil::getMSTZnameFromTZName() no MS name found for 'Europe/Berlin'. Returning '(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London'
BackendCalDAV->_ParseVEventToSyncObject(): 'X-MICROSOFT-CDO-ALLDAYEVENT' is not yet supported.
O
Hello meitonga,
I had the same problem.
The following quick fix solved it for me. But I'm not a contributer of this project, so this has to be checked again.
File: lib/utils/TimezoneUtils.php
static public function getMSTZnameFromTZName($name) {
foreach (self::$mstzones as $mskey => $msdefs) {
if ($name == $msdefs[0])
return $msdefs[1];
}
// These lines were added
$servertzname = self::guessTZNameFromPHPName($name);
return self::GetFullTZFromTZName($servertzname);
// ZLog::Write(LOGLEVEL_WARN, sprintf("TimezoneUtil::getMSTZnameFromTZName() no MS name found for '%s'. Returning '(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London'", $name));
//return self::$mstzones["085"][1];
}
Hello Santiago-x,
thanks for the reply, that solved it for me !!
Can some coder look into the change ?
Hey Santiago-x,
thanks a lot, the commit fixed the issue for me, too.
Will it keep working with summer and winter time in the respective timezone?
Hello tiiiecherle,
it should work with summer and winter time. Unfortunately, I'm not able to test it because my phone has a bug in the calender app :(
Any help would be appreciated.
Hey Santiago-x,
thanks, I´ll try it out when possible.
@Santiago-x could you make a merge request so I can push your change? If it's not possible I will add it as an independent commit.
Thanks!!
Possibly related issue: CalDAV backend is Owncloud here, sync'ing with iDevices. Sync'ing appointments works fine from iDevice to Owncloud calender. From Owncloud to iDevice works fine in winter, however in DST period appointments show up on iDevice 1h too late. After some investigation I found that there is something going wrong in caldav.php, line 609 (function _ParseVEventToSyncObject() ): $message->starttime = Utils::MakeUTCDate($property->Value(), Utils::ParseTimezone($property->GetParameterValue("TZID"))); At least with Owncloud $property->GetParameterValue("TZID") returns a timezone in the format like "Europe/Berlin". ParseTimezone() converts it into MS format "(GMT+01:00) Amsterdam..." (is this intended?), but MakeUTCDate() expects "Europe/Berlin". With MS format it still returns a generic +1 timezone, but the DST information is lost. I patched it for my specific case by changing line 609 to: $message->starttime = Utils::MakeUTCDate($property->Value(), $property->GetParameterValue("TZID")); // do not call ParseTimezone() In my case, MakeUTCDate() now always returns the correct UTC date, but this may not be a general solution for other CalDAV servers. Perhaps it would be better to rework ParseTimezone() accordingly instead. I am not aware what side effects this may cause, so I preferred not to change anything there.
Hi tboerner,
thank you for your feedback! I also checked it and I totally agree with you. Therefore I will provide a new patch for this issue in a few minutes.
I also reflected my workaround and will provide a "better" solution which fits better to the improvements made by croessler #260
Hi Santiago-x, thanks for your feedback - and the patch!
Hi,
I use the latest z-push-contrib version together with Owncloud as caldav server.
When I create a calendar entry on the phone (Android 4.4.2) the correct time is also displayed in Owncloud. When I change that event (e.g. the title) in Owncloud, the updated event is sent to the phone with a time of 2 hours later.
In the log I see: TimezoneUtil::getMSTZnameFromTZName() no MS name found for 'Europe/Berlin'. Returning '(GMT) Greenwich Mean Time: Dublin, Edinburgh, Lisbon, London'
The XML Debug is in the attachment. The true time from this entry is 14:30-15:30. My phone displays 16:30-17:30
Any ideas ?
Meitonga