diff options
-rw-r--r-- | system/helpers/date_helper.php | 14 | ||||
-rw-r--r-- | tests/codeigniter/helpers/date_helper_test.php | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/system/helpers/date_helper.php b/system/helpers/date_helper.php index 065a223ef..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) ); } } diff --git a/tests/codeigniter/helpers/date_helper_test.php b/tests/codeigniter/helpers/date_helper_test.php index 1d397ac81..8258c9248 100644 --- a/tests/codeigniter/helpers/date_helper_test.php +++ b/tests/codeigniter/helpers/date_helper_test.php @@ -196,9 +196,9 @@ class Date_helper_test extends CI_TestCase { public function test_local_to_gmt() { $this->assertEquals( - gmmktime( - date('G', $this->time), date('i', $this->time), date('s', $this->time), - date('n', $this->time), date('j', $this->time), date('Y', $this->time) + mktime( + gmdate('G', $this->time), gmdate('i', $this->time), gmdate('s', $this->time), + gmdate('n', $this->time), gmdate('j', $this->time), gmdate('Y', $this->time) ), local_to_gmt($this->time) ); |