From 42fa04b188a742b3d0907b9839a5ceea64d85e01 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 11 Jan 2016 13:30:40 +0000 Subject: [PATCH] fixed a bug in time convertion --- codepot/src/codepot/helpers/codepot_helper.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/codepot/src/codepot/helpers/codepot_helper.php b/codepot/src/codepot/helpers/codepot_helper.php index 7165593e..ded1df78 100644 --- a/codepot/src/codepot/helpers/codepot_helper.php +++ b/codepot/src/codepot/helpers/codepot_helper.php @@ -34,11 +34,11 @@ if ( ! function_exists('codepot_nowtodbdate')) { if (CODEPOT_DATABASE_STORE_GMT) { - return gmstrftime('%Y-%m-%d %H:%M:%S'); + return gmstrftime('%Y-%m-%d %H:%M:%S', time()); } else { - return gmstrftime('%Y-%m-%d %H:%M:%S'); + return strftime('%Y-%m-%d %H:%M:%S', time()); } } } @@ -53,7 +53,7 @@ if ( ! function_exists('codepot_unixtimetodbdate')) } else { - return gmstrftime('%Y-%m-%d %H:%M:%S', $unixtime); + return strftime('%Y-%m-%d %H:%M:%S', $unixtime); } } } @@ -62,6 +62,7 @@ if ( ! function_exists('codepot_dbdatetodispdate')) { function codepot_dbdatetodispdate($dbdate) { + // display time is in the local time zone. if (CODEPOT_DATABASE_STORE_GMT) { return strftime('%Y-%m-%d %H:%M:%S %z', strtotime($dbdate . ' +0000'));