summaryrefslogtreecommitdiffstats
path: root/system/helpers/date_helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers/date_helper.php')
-rw-r--r--system/helpers/date_helper.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php
index 077a6712c..cafb6ba95 100644
--- a/system/helpers/date_helper.php
+++ b/system/helpers/date_helper.php
@@ -304,13 +304,13 @@ if ( ! function_exists('local_to_gmt'))
$time = time();
}
- return gmmktime(
- date('G', $time),
- date('i', $time),
- date('s', $time),
- date('n', $time),
- date('j', $time),
- date('Y', $time)
+ return mktime(
+ gmdate('G', $time),
+ gmdate('i', $time),
+ gmdate('s', $time),
+ gmdate('n', $time),
+ gmdate('j', $time),
+ gmdate('Y', $time)
);
}
}
@@ -488,6 +488,10 @@ if ( ! function_exists('nice_date'))
{
return 'Unknown';
}
+ elseif (empty($format))
+ {
+ $format = 'U';
+ }
// Date like: YYYYMM
if (preg_match('/^\d{6}$/i', $bad_date))