From a9d476f0123273b8ccd51ffb4669d6631a8b40d6 Mon Sep 17 00:00:00 2001
From: Thomas Bruederli <thomas@roundcube.net>
Date: Tue, 29 Oct 2013 04:12:44 -0400
Subject: [PATCH] Merge branch 'master' of github.com:roundcube/roundcubemail

---
 program/steps/addressbook/save.inc |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/program/steps/addressbook/save.inc b/program/steps/addressbook/save.inc
index 2adc53b..7911802 100644
--- a/program/steps/addressbook/save.inc
+++ b/program/steps/addressbook/save.inc
@@ -80,8 +80,8 @@
 
     // normalize the submitted date strings
     if ($colprop['type'] == 'date') {
-        if ($timestamp = rcube_utils::strtotime($a_record[$col])) {
-            $a_record[$col] = date('Y-m-d', $timestamp);
+        if ($a_record[$col] && ($dt = rcube_utils::anytodatetime($a_record[$col]))) {
+            $a_record[$col] = $dt->format('Y-m-d');
         }
         else {
             unset($a_record[$col]);

--
Gitblit v1.9.1