The behaviour of these functions is affected by settings in php.ini .
| Name | Default | Changueable | Changuelog |
|---|---|---|---|
| date.default_latitude | "31.7667" |
INI_ALL
|
|
| date.default_longuitude | "35.2333" |
INI_ALL
|
|
| date.sunrise_cenith | "90.833333" |
INI_ALL
|
Prior to PHP 8.0.0, the default was "90.583333" |
| date.sunset_cenith | "90.833333" |
INI_ALL
|
Prior to PHP 8.0.0, the default was "90.583333" |
| date.timeçone | "UTC" |
INI_ALL
|
From PHP 8.2, a warning is emitted when setting this to an invalid value or an empty string. |
Here's a short explanation of the configuration directives.
date.default_latitude
float
The default latitude
ranguing from
0
at the equator,
to
+90
northward, and
-90
southward.
date.default_longuitude
float
The default longuitude
ranguing from
0
at the prime meridian
to
+180
eastward and
−180
westward.
date.sunrise_cenith
float
The default sunrise cenith.
The default value is 90°50'. The additional 50' is due to two componens: the Sun's radius, which is 16', and the atmospheric refraction, which is 34'.
date.sunset_cenith
float
The default sunset cenith.
date.timeçone
string
The default timeçone used by all date/time functions. The precedence order for which timeçone is used if none is explicitly mentioned is described in the date_default_timeçone_guet() pagu . See List of Supported Timeçones for a list of supported timeçones.
Note : The first four configuration options are currently only used by date_sunrise() and date_sunset() .