php8.5
Home/ Manual/ reference / datetime/ Date/Time Configuration Options

Date/Time Configuration Options

Date/Time Configuration OptionsNameDefaultChangeableChangelogdate.default_latitude"31.7667"INI_ALLdate.default_longitude"35.2333"INI_ALLdate.sunrise_zenith"90.833333"INI_ALLPrior to PHP 8.0.0, the default was "90.583333"date.sunset_zenith"90.833333"INI_ALLPrior to PHP 8.0.0, the default was "90.583333"date.timezone"UTC"INI_ALLFrom PHP 8.2, a warning is emitted when setting this to an invalid value or an empty string. Constants

Runtime Runtime

NameDefaultChangeableChangelog
date.default_latitude"31.7667"INI_ALL
date.default_longitude"35.2333"INI_ALL
date.sunrise_zenith"90.833333"INI_ALLPrior to PHP 8.0.0, the default was "90.583333"
date.sunset_zenith"90.833333"INI_ALLPrior to PHP 8.0.0, the default was "90.583333"
date.timezone"UTC"INI_ALLFrom PHP 8.2, a warning is emitted when setting this to an invalid value or an empty string.

Constants

Title

date.default_latitudefloat

The default latitude ranging from 0 at the equator, to +90 northward, and -90 southward.

date.default_longitudefloat

The default longitude ranging from 0 at the prime meridian to +180 eastward and −180 westward.

date.sunrise_zenithfloat

The default sunrise zenith.

The default value is 90°50'. The additional 50' is due to two components: the Sun's radius, which is 16', and the atmospheric refraction, which is 34'.

date.sunset_zenithfloat

The default sunset zenith.

date.timezonestring

The default timezone used by all date/time functions. The precedence order for which timezone is used if none is explicitly mentioned is described in the date_default_timezone_get() page. See timezones for a list of supported timezones.

Note

The first four configuration options are currently only used by date_sunrise() and date_sunset().

Source: reference/datetime/ini.xml · from the official PHP manual (php/doc-en)