Geburtstagsproblem wieder da - Android 1 Tag zurück

Deutsches Benutzerforum

Geburtstagsproblem wieder da - Android 1 Tag zurück

Postby DaBirn » Thu Oct 25, 2012 2:18 pm

Hallo zusammen,
seit dem gestrigen Update auf Joey 2012.10.1 habe ich wieder das alte Geburtstagsproblem unter Android - sprich die Geburtstage werden einen Tag früher im Adressbuch angezeitgt. Unter Miland habe ich dieses Verhalten mit dem "addHour(12)" TRick behoben.
Milan-Syntax:

case 'bday':
if(strtolower($this->_device->devicetype) == 'iphone'){
if($data->$value instanceof DateTime) {
$nodeContent = $data->bday->format("Y-m-d\TH:i:s") . '.000Z';
}
}
/* START MOD FOR ANDROID */
else{
if($data->$value instanceof DateTime) {
$userTimezone = Tinebase_Core::get(Tinebase_Core::USERTIMEZONE);
$data->bday->setTimezone($userTimezone);
$data->bday->addHour(12);
$data->bday = new Tinebase_DateTime($data->bday->format(Tinebase_Record_Abstract::ISO8601LONG), 'UTC');
$nodeContent = $data->bday->format("Y-m-d");
}
}
/* END MOD FOR ANDROID */
break;

Leider schaffe ich es nicht diesen Mod unter Joey umzusetzen. Hat da jemand eine Idee?

case 'bday':
#$isoDate = (string)$data->$fieldName;
$contact->$value = new Tinebase_DateTime($data->$fieldName);

if (
// ($this->_device->devicetype == Syncroton_Model_Device::TYPE_WEBOS) || // only valid versions < 2.1
($this->_device->devicetype == Syncroton_Model_Device::TYPE_IPHONE && $this->_device->getMajorVersion() < 800)/* ||
preg_match("/^\d{4}-\d{2}-\d{2}$/", $isoDate)*/
) {
// iOS < 4 & webow < 2.1 send birthdays to the entered date, but the time the birthday got entered on the device
// acutally iOS < 4 somtimes sends the bday at noon but the timezone is not clear
// -> we don't trust the time part and set the birthdays timezone to the timezone the user has set in tine
$userTimezone = Tinebase_Core::get(Tinebase_Core::USERTIMEZONE);
$contact->$value = new Tinebase_DateTime($contact->bday->setTime(0,0,0)->format(Tinebase_Record_Abstract::ISO8601LONG), $userTimezone);
$contact->$value->setTimezone('UTC');
}
/* START ANDROID MOD*/
else{
$userTimezone = Tinebase_Core::get(Tinebase_Core::USERTIMEZONE);
$contact->$value = new Tinebase_DateTime($contact->bday->addHour(12)->setTime(0,0,0)->format(Tinebase_Record_Abstract::ISO8601LONG), $userTimezone);
$contact->$value->setTimezone('UTC');
}
/* END ANDROID MOD*/
break;

So geht es leider nicht...

Danke schon an alle Helfer.
DaBirn
 
Posts: 1
Joined: Thu Oct 25, 2012 2:09 pm

Re: Geburtstagsproblem wieder da - Android 1 Tag zurück

Postby ph_il » Mon Oct 29, 2012 5:48 pm

hier ist auch der zugehörige bugreport: https://forge.tine20.org/mantisbt/view.php?id=6638
Philipp Schüle
Tine 2.0 Core Developer

Visit http://www.tine20.com (commercial support, consulting and development)
Visit http://www.officespot20.com (Tine 2.0 hosting)
User avatar
ph_il
Tine 2.0 Core Developer
 
Posts: 3450
Joined: Fri Mar 07, 2008 11:41 am


Return to Deutsch [German]

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests

Startseite
NewsDemoDownloadForumWikiBlog
Support
Support at first hand!
If the forum does not help anymore ... Professional support is available directly from our Tine2.0 core Developers.

more »