PHP Manualen
forrige |  | næste

# date_default_timezone_set

(no version information, might be only in CVS)

date_default_timezone_set -- Sets the default timezone used by all date/time functions in a script

## Beskrivelse

bool date_default_timezone_set ( string timezone_identifier )

date_default_timezone_set() sets the default timezone used by all date/time functions.

The order that PHP tries to find the default timezone is the following:

- The timezone set using this function (if any)

- The TZ environment variable (if set)

- The date.timezone ini option (if set)

- "magical" guess (if the operating system supports it)

- If none of the above options succeeds, falback to UTC

> Bemærk: Since PHP 5.1.0 (when the date/time functions were rewritten), every call to a date/time function will generate a `E_NOTICE` if the timezone isn't valid.

## Parameterliste

timezone_identifier

  The timezone identifier, like UTC or Europe/Lisbon

## Returneringsværdier

This function always returns `TRUE` (even if the timezone_identifier isn't valid).

## Se også

date_default_timezone_get()

forrige | hjem | næste
date_default_timezone_get | op | date_sunrise