From 52830ea6056dc85d8ffcb0cfb7ead7d70624e109 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 10 Sep 2013 17:37:10 -0400
Subject: [PATCH] Improve handling of date strings and DateTime values in contacts

---
 program/lib/Roundcube/rcube_vcard.php |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/lib/Roundcube/rcube_vcard.php b/program/lib/Roundcube/rcube_vcard.php
index a85eb88..d54dc56 100644
--- a/program/lib/Roundcube/rcube_vcard.php
+++ b/program/lib/Roundcube/rcube_vcard.php
@@ -358,8 +358,8 @@
 
         case 'birthday':
         case 'anniversary':
-            if (($val = rcube_utils::strtotime($value)) && ($fn = self::$fieldmap[$field])) {
-                $this->raw[$fn][] = array(0 => date('Y-m-d', $val), 'value' => array('date'));
+            if (($val = rcube_utils::anytodatetime($value)) && ($fn = self::$fieldmap[$field])) {
+                $this->raw[$fn][] = array(0 => $val->format('Y-m-d'), 'value' => array('date'));
             }
             break;
 

--
Gitblit v1.9.1