timezone_version_get

(PHP 5 >= 5.3.0, PHP 7, PHP 8)

timezone_version_gettimezonedb sürümünü döndürür

Açıklama

timezone_version_get(): string

Geçerli timezonedb sürümünü döndürür

Bağımsız Değişkenler

Bu işlevin bağımsız değişkeni yoktur.

Dönen Değerler

YYYY.sürüm biçemini örneğin 2022.2 dizgesi olarak döndürür.

Zaman dilimi veritabanının eski bir sürümü kullanılıyorsa (örneğin geçerli yılı göstermiyorsa), zaman dilimi bilgisi ya PHP güncellenerek ya da » timezonedb PECL paketi kurularak güncellenebilir.

Bazı Linux dağıtımları, saat dilimi bilgisi için ayrı bir kaynak kullanmak amacıyla PHP'nin tarih/saat desteğine yama uygular. Bu durumda bu işlev 0.system değerini döndürecektir. Bu durumda da » timezonedb PECL paketinin kurulması önerilir.

Örnekler

Örnek 1 - timezonedb sürümünün öğrenilmesi

<?php
echo timezone_version_get();
?>

Yukarıdaki örnek şuna benzer bir çıktı üretir:

2022.2

add a note

User Contributed Notes 1 note

up
0
gwenbrod at gmail dot com
10 days ago
If the output of timezone_version_get() is "0.system", the documentation encourages to install the timezonedb PECL package. However, consider leaving it as is, because "0.system"indicates the operating system's tzdata database is being used, which is actually desirable, since the tzdata package gets updated by the operating system's package manager.
To Top