PHP Manualen
forrige |  | næste

# XX. Date and Time Functions

# Introduktion

These functions allow you to get the date and time from the server where your PHP scripts are running. You can use these functions to format the date and time in many different ways.

> Bemærk: Please keep in mind that these functions are dependent on the locale settings of your server. Make sure to take daylight saving time (use e.g. $date = strtotime('+7 days', $date) and not $date += 7*24*60*60) and leap years into consideration when working with these functions.

# Systemkrav

Ingen eksterne libraries er nødvendige for at kompilere denne udvidelse.

# Installation

Der er ingen installation nødvendig for at kunne bruge disse funktioner; de er en del af PHP kernen.

# Runtime Konfiguration

Denne udvidelse har intet konfigurations-direktiv defineret i `php.ini`.

# Runtime Konfiguration

Virkemåden af disse funktioner er berørt af indstillinger i `php.ini`.

Tabel 1. Date/Time Configuration Options

Name | Default | Changeable | Changelog
--- | --- | --- | ---
date.default_latitude | "31.7667" | PHP_INI_ALL | Available since PHP 5.0.0.
date.default_longitude | "35.2333" | PHP_INI_ALL | Available since PHP 5.0.0.
date.sunrise_zenith | "90.83" | PHP_INI_ALL | Available since PHP 5.0.0.
date.sunset_zenith | "90.83" | PHP_INI_ALL | Available since PHP 5.0.0.
date.timezone | "" | PHP_INI_ALL | Available since PHP 5.1.0.

For flere detaljer og definationer af PHP_INI_* constanterne, se ini_set() dokumentation.

Her er en kort forklaring på konfigurations-direktiverne.

date.default_latitude float

  The default latitude.

date.default_longitude float

  The default longitude.

date.sunrise_zenith float

  The default sunrise zenith.

date.sunset_zenith float

  The default sunset zenith.

date.timezone string

  The default timezone used by all date/time functions if the TZ environment variable isn't set. The precedence order is described in the date_default_timezone_set() page.

> Bemærk: The first four configuration options are currently only used by date_sunrise() and date_sunset().

# Ressourcetyper

Denne udvidelse har ingen ressourcetyper defineret.

# Foruddefinerede Konstanter

Denne udvidelse har ingen konstanter.

forrige | hjem | næste
cyrus_unbind | op | checkdate