PHP Eğitimi

PHP ANA SAYFA PHP'ye Giriş PHP Kurulumu PHP Sözdizimi PHP Yorumları PHP Değişkenleri PHP Yankı / Yazdır PHP Veri Türleri PHP Dizeleri PHP Numaraları PHP Matematik PHP Sabitleri PHP Operatörleri PHP If...Else...Elseif PHP Anahtarı PHP Döngüleri PHP Fonksiyonları PHP Dizileri PHP Süper Küreseller PHP Normal İfade

PHP Formları

PHP Form İşleme PHP Form Doğrulama PHP Formu Gerekli PHP Formu URL/E-posta PHP Formu Tamamlandı

PHP Gelişmiş

PHP Tarih ve Saat PHP Dahil PHP Dosya İşleme PHP Dosyası Aç/Oku PHP Dosyası Oluştur/Yaz PHP Dosya Yükleme PHP Çerezleri PHP Oturumları PHP Filtreleri PHP Filtreleri Gelişmiş PHP Geri Çağırma İşlevleri PHP JSON'u PHP İstisnaları

PHP OOP

PHP OOP nedir PHP Sınıfları/Nesneleri PHP Oluşturucu PHP Yıkıcı PHP Erişim Değiştiricileri PHP Kalıtımı PHP Sabitleri PHP Soyut Sınıfları PHP Arayüzleri PHP Özellikleri PHP Statik Yöntemler PHP Statik Özellikler PHP Ad Alanları PHP Yinelenebilirler

MySQL Veritabanı

MySQL Veritabanı MySQL Bağlantısı MySQL Veritabanı Oluştur MySQL Tablo Oluştur MySQL Veri Ekle MySQL Son Kimliği Al MySQL Ekle Çoklu MySQL Hazırlandı MySQL Seçim Verisi MySQL Nerede MySQL Sıralaması MySQL Verileri Sil MySQL Güncelleme Verileri MySQL Sınır Verileri

PHP XML'i

PHP XML Ayrıştırıcıları PHP SimpleXML Ayrıştırıcı PHP SimpleXML - Al PHP XML Expat'ı PHP XML DOM'si

PHP - AJAX

AJAX'a Giriş AJAX PHP AJAX Veritabanı AJAX XML'i AJAX Canlı Arama AJAX Anketi

PHP Örnekleri

PHP Örnekleri PHP Derleyici PHP Testi PHP Alıştırmaları PHP Sertifikası

PHP Referansı

PHP'ye Genel Bakış PHP Dizisi PHP Takvimi PHP Tarihi PHP Dizini PHP Hatası PHP İstisnası PHP Dosya Sistemi PHP Filtresi PHP FTP'si PHP JSON'u PHP Anahtar Kelimeler PHP Libxml PHP Postası PHP Matematik PHP Çeşitli PHP MySQLi PHP Ağı PHP Çıkış Kontrolü PHP Normal İfade PHP SimpleXML PHP Akışı PHP Dizisi PHP Değişken İşleme PHP XML Ayrıştırıcı PHP Posta Kodu PHP Saat Dilimleri

PHP gmstrftime() İşlevi

❮ PHP Tarih/Saat Referansı

Örnek

GMT/UTC tarih ve saatini yerel ayarlara göre biçimlendirin:

<?php
echo(gmstrftime("%B %d %Y, %X %Z",mktime(20,0,0,12,31,98))."<br>");
setlocale(LC_ALL,"hu_HU.UTF8");
echo(gmstrftime("%Y. %B %d. %A. %X %Z"));
?>

Tanım ve Kullanım

gmstrftime() işlevi, yerel ayarlara göre bir GMT/UTC saatini ve/veya tarihini biçimlendirir.

İpucu: Ayrıca yerel saat ve/veya tarihi yerel ayarlara göre biçimlendiren strftime() işlevine de bakın.


Sözdizimi

gmstrftime(format, timestamp)

Parametre Değerleri

Parameter Description
format Required. Specifies how to return the result:
  • %a - abbreviated weekday name
  • %A - full weekday name
  • %b - abbreviated month name
  • %B - full month name
  • %c - preferred date and time representation
  • %C - century number (the year divided by 100, range 00 to 99)
  • %d - day of the month (01 to 31)
  • %D - same as %m/%d/%y
  • %e - day of the month (1 to 31)
  • %g - like %G, but without the century
  • %G - 4-digit year corresponding to the ISO week number (see %V).
  • %h - same as %b
  • %H - hour, using a 24-hour clock (00 to 23)
  • %I - hour, using a 12-hour clock (01 to 12)
  • %j - day of the year (001 to 366)
  • %m - month (01 to 12)
  • %M - minute
  • %n - newline character
  • %p - either am or pm according to the given time value
  • %r - time in a.m. and p.m. notation
  • %R - time in 24 hour notation
  • %S - second
  • %t - tab character
  • %T - current time, equal to %H:%M:%S
  • %u - weekday as a number (1 to 7), Monday=1. Warning: In Sun Solaris Sunday=1
  • %U - week number of the current year, starting with the first Sunday as the first day of the first week
  • %V - The ISO 8601 week number of the current year (01 to 53), where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week
  • %W - week number of the current year, starting with the first Monday as the first day of the first week
  • %w - day of the week as a decimal, Sunday=0
  • %x - preferred date representation without the time
  • %X - preferred time representation without the date
  • %y - year without a century (range 00 to 99)
  • %Y - year including the century
  • %Z or %z - time zone or name or abbreviation
  • %% - a literal % character
timestamp Optional. Specifies a Unix timestamp that represents the date and/or time to be formatted. Default is the current local time (time())


Teknik detaylar

Geri dönüş değeri: Verilen zaman damgasını kullanarak biçime göre biçimlendirilmiş bir dize döndürür . Ay ve hafta içi adları ve dile bağlı diğer dizeler, setlocale() ile ayarlanan geçerli yerel ayara uyar
PHP Sürümü: 4+

❮ PHP Tarih/Saat Referansı