Cake\Chronos\Traits\FactoryTrait::createFromTimestamp PHP Method

createFromTimestamp() public static method

Create a ChronosInterface instance from a timestamp
public static createFromTimestamp ( integer $timestamp, DateTimeZon\DateTimeZone | string | null $tz = null ) : static
$timestamp integer The timestamp to create an instance from.
$tz DateTimeZon\DateTimeZone | string | null The DateTimeZone object or timezone name the new instance should use.
return static
    public static function createFromTimestamp($timestamp, $tz = null)
    {
        return static::now($tz)->setTimestamp($timestamp);
    }