Welcome Guest, Not a member yet? Register   Sign In
local to gmt function doesn't work
#2

GMT is correct, but I think your $config['time_reference'] is incorrect.

The explanation in the config.php is
PHP Code:
/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/ 

Note the first line: Options are 'local' or any PHP supported timezone

If you look at PHP.net
an expected timezone for Singapore = Asia/Singapore

So if the set timezone in not supported, it will fail and use the system default.
Which in your case is Europe/Berlin which explains the 2 hour difference between your Local and GMT time
Reply


Messages In This Thread
local to gmt function doesn't work - by ardavan - 07-11-2017, 06:41 AM
RE: local to gmt function doesn't work - by Martin7483 - 07-11-2017, 01:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB