Change date formatting to whatever the current user happens to have.

This commit is contained in:
Nathan Gray 2010-11-04 16:45:22 +00:00
parent f5b892f682
commit e0a2ab959d

View File

@ -133,7 +133,9 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
} }
} }
foreach(self::$types['date-time'] as $name) { foreach(self::$types['date-time'] as $name) {
if ($record->$name) $record->$name = date('Y-m-d H:i:s',$record->$name); //if ($record->$name) $record->$name = date('Y-m-d H:i:s',$record->$name);
if ($record->$name) $record->$name = date($GLOBALS['egw_info']['user']['preferences']['common']['dateformat'] . ' '.
($GLOBALS['egw_info']['user']['preferences']['common']['timeformat'] == '24' ? 'H' : 'h').':m:s',$record->$name); // User date format
} }
if ($record->tel_prefer) { if ($record->tel_prefer) {
$field = $record->tel_prefer; $field = $record->tel_prefer;