date_default_timezone_set() function is used to sets the default timezone used by all date or time functions in core PHP, CodeIgniter etc. # Option-1: [...]
Check if it is Localhost or server: function is_localhost() { $whitelist = array( ‘127.0.0.1’, ‘::1’ ); return in_array( $_SERVER[‘REMOTE_ADDR’], [...]