Creates a new Date instance using a string datetime value. The timezone of the Date
result will be in UTC.
public static factory ( string | integer $dateString, string $timezone = null ) : |
||
$dateString | string | integer | `'today'`, `'yesterday'`, `'now'`, `'yesterdaySameTime'`, a string with `'YYYY-MM-DD HH:MM:SS'` format or a unix timestamp. |
$timezone | string | The timezone of the result. If specified, `$dateString` will be converted from UTC to this timezone before being used in the Date return value. |
return |