Time::__unserialize()

Converts the serialized data back to its object.

Table of Contents
  1. Description
  2. Example

Description

Time::__unserialize(array $lot): void;

This method will be called when the serialized data is successfully returned into a Time instance using the built-in PHP unserialize() function.

Example

$time = unserialize('O:4:"Time":3:{s:6:"parent";N;s:5:"value";s:19:"2026-04-16 19:27:10";s:4:"zone";s:12:"Asia/Jakarta";}');

echo $time->hour; // Returns `'19'`

Time::__unserialize()

Converts the serialized data back to its object.

Time::day()

Returns the day number of the week, or the day name.

Time::format()

Returns the date/time formatted according to the given format.

Time::i()

Returns the date/time formatted according to the given pattern.

Time::name()

Returns the date/time format as a valid file name.

Time::to()

Converts current date/time zone to other date/time zone.