diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-07-06 03:56:13 -0700 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-07-06 03:56:13 -0700 |
commit | e7d0bf44e4f9958b211f0a010e7c70ea0cae7da7 (patch) | |
tree | e6383f5824a4e40668ca8900f2eb39292f9774c8 /views/default/output | |
parent | e4ad206bfd288463a37cfd4f86e6f343e3a35f77 (diff) | |
parent | e44192fba9e7b9155061e141278a9c16ed4923f5 (diff) | |
download | elgg-e7d0bf44e4f9958b211f0a010e7c70ea0cae7da7.tar.gz elgg-e7d0bf44e4f9958b211f0a010e7c70ea0cae7da7.tar.bz2 |
Merge pull request #56 from cash/improve-date-handling
Improve date handling
Diffstat (limited to 'views/default/output')
-rw-r--r-- | views/default/output/date.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/views/default/output/date.php b/views/default/output/date.php index fda7668e7..7c98dddc9 100644 --- a/views/default/output/date.php +++ b/views/default/output/date.php @@ -6,10 +6,12 @@ * @package Elgg * @subpackage Core * - * @uses $vars['value'] A UNIX epoch timestamp - * + * @uses $vars['value'] Date as text or a Unix timestamp in seconds */ -if ($vars['value'] > 86400) { - echo date("n/d/Y", $vars['value']); -}
\ No newline at end of file +// convert timestamps to text for display +if (is_numeric($vars['value'])) { + $vars['value'] = gmdate('Y/m/d', $vars['value']); +} + +echo $vars['value']; |