Bump:
Quote:
Originally Posted by smoky28
PHP Code:
function get_date_time($timestamp = 0){ if ($timestamp) return date("Y-m-d H:i:s", $timestamp); else return gmdate("Y-m-d H:i:s");}
replace globalfuntcions php.
|
If your fix prevents the warning from occurring and the person is happy with the fix than good BUT one has to wonder if the fix will also fix the security issue in the warning :(
If u need to get the correct time no matter where u are in the world and u wana do so without PHP complaining then this could work BUT! like I said u will need to edit a few things.
Just an example.
PHP Code:
function get_date_time(){
global $CURUSER;
date_default_timezone_set($CURUSER["timezone"]);
return date("Y-m-d H:i:s");
}
I suppose u could just add
PHP Code:
date_default_timezone_set($CURUSER["timezone"]);
at or near the top of globalfuntions.php too, if u want but maybe best practice to only trigger this when been used.