Code:
$now = Time::now();
$new_now = Time::createFromTimestamp($now->timestamp);
$new_now create from $now->timestamp
but $new_now not showing the same Time with $now
even I add timeZone in the createFromTimestamp()
The time not change.
Is this a bug?
Code:
// $now with (int)1642422355
object(CodeIgniter\I18n\Time)[78]
protected 'timezone' =>
object(DateTimeZone)[80]
public 'timezone_type' => int 3
public 'timezone' => string 'America/Chicago' (length=15)
protected 'locale' => string 'en' (length=2)
protected 'toStringFormat' => string 'yyyy-MM-dd HH:mm:ss' (length=19)
public 'date' => string '2022-01-17 06:25:55.438431' (length=26)
public 'timezone_type' => int 3
public 'timezone' => string 'America/Chicago' (length=15)
Code:
// $new_now with (int) 1642422355
object(CodeIgniter\I18n\Time)[81]
protected 'timezone' =>
object(DateTimeZone)[82]
public 'timezone_type' => int 3
public 'timezone' => string 'UTC' (length=3)
protected 'locale' => string 'en' (length=2)
protected 'toStringFormat' => string 'yyyy-MM-dd HH:mm:ss' (length=19)
public 'date' => string '2022-01-17 12:25:55.000000' (length=26)
public 'timezone_type' => int 3
public 'timezone' => string 'UTC' (length=3)