← All docs

date_default_timezone_set()

Sets the default timezone.

date_default_timezone_set()

function date_default_timezone_set(string $timezoneId): bool

Sets the default timezone.

Parameters:

  • $timezoneId (string)

Returns: bool

Availability

Compiled (AOT)Magician (eval)
AvailableAvailable

No examples yet. Check examples/ and showcases/ for usage patterns.

Internals

For how date_default_timezone_set is implemented in the compiler, see the internals page.