← 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

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.