gza / oczpush

Owncloud Z-push 2.0 plugin
GNU Affero General Public License v3.0
32 stars 26 forks source link

Bada Phone birthday #24

Open fr43nk opened 11 years ago

fr43nk commented 11 years ago

When using my Bada mobile phone there is an issue saving a birthday date. All dates written to the server are one day early. The problem I think goes to the phone because it sends the date string in the wrong format:

Entering: 1980-05-12 written in the log file:

15/01/2013 17:41:11 [10227] [WBXML] [user] I 1980-05-11T23:00:00.000Z Is it possible to make a special workaround for this? Best regards, Frank
gza commented 11 years ago

Where do you leave ? (what timezone) "Z" at the end of the string means that this time is GMT When converted to GMT+1, this should be corrected.

instead of line 618 of occalendar, try something like this (I don't tryed):

    date_default_timezone_set(\OCP\Config::getUserValue(\OCP\USER::getUser(), 'calendar', 'timezone', date_default_timezone_get());
$data .= 'BDAY:'.date('c', $message->birthday)."\n";
    date_default_timezone_set('UTC');

If it work please provide a patch.

fr43nk commented 11 years ago

I will give it a try. I think I did not accurately descriped the issue: It is about the birthday safed in the vcard of a contact. Is there a similar setting for timezone in occontact?