From 616840245b91bc44ab7ef31d8e1e5afdd41cce93 Mon Sep 17 00:00:00 2001 From: Steven Wittens <steven@10.no-reply.drupal.org> Date: Tue, 4 Apr 2006 06:52:59 +0000 Subject: [PATCH] #56750: Make date profile field work with ISO date format --- modules/profile.module | 2 +- modules/profile/profile.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/profile.module b/modules/profile.module index 33422cd3818a..b37cc59b01f1 100644 --- a/modules/profile.module +++ b/modules/profile.module @@ -530,7 +530,7 @@ function profile_view_field($user, $field) { case 'url': return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>'; case 'date': - list($format) = explode(' - ', variable_get('date_format_short', 'm/d/Y - H:i'), 2); + $format = substr(variable_get('date_format_short', 'm/d/Y - H:i'), 0, 5); // Note: Avoid PHP's date() because it does not handle dates before // 1970 on Windows. This would make the date field useless for e.g. // birthdays. diff --git a/modules/profile/profile.module b/modules/profile/profile.module index 33422cd3818a..b37cc59b01f1 100644 --- a/modules/profile/profile.module +++ b/modules/profile/profile.module @@ -530,7 +530,7 @@ function profile_view_field($user, $field) { case 'url': return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>'; case 'date': - list($format) = explode(' - ', variable_get('date_format_short', 'm/d/Y - H:i'), 2); + $format = substr(variable_get('date_format_short', 'm/d/Y - H:i'), 0, 5); // Note: Avoid PHP's date() because it does not handle dates before // 1970 on Windows. This would make the date field useless for e.g. // birthdays. -- GitLab