Scalr_Util_DateTime::correctTime PHP Method

correctTime() public static method

Correct time with current timezone offset
public static correctTime ( integer $time, float $tz_offset = null ) : integer
$time integer Time to convert
$tz_offset float timezone offset in hours
return integer Returns unix timestamp
    public static function correctTime($time = 0, $tz_offset = null)
    {
        if (!is_numeric($time)) {
            $time = strtotime($time);
        }
        if (!$time) {
            $time = time();
        }
        return is_null($tz_offset) ? $time : $time - date('Z') + $tz_offset * 3600;
    }