Commit 61684024 authored by Steven Wittens's avatar Steven Wittens
Browse files

#56750: Make date profile field work with ISO date format

parent d87aa9e4
...@@ -530,7 +530,7 @@ function profile_view_field($user, $field) { ...@@ -530,7 +530,7 @@ function profile_view_field($user, $field) {
case 'url': case 'url':
return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>'; return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>';
case 'date': 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 // 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. // 1970 on Windows. This would make the date field useless for e.g.
// birthdays. // birthdays.
......
...@@ -530,7 +530,7 @@ function profile_view_field($user, $field) { ...@@ -530,7 +530,7 @@ function profile_view_field($user, $field) {
case 'url': case 'url':
return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>'; return '<a href="'. check_url($value) .'">'. check_plain($value) .'</a>';
case 'date': 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 // 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. // 1970 on Windows. This would make the date field useless for e.g.
// birthdays. // birthdays.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment