PHP 8.3.4 Released!

gmstrftime

(PHP 4, PHP 5, PHP 7, PHP 8)

gmstrftime Formatta una data/ora GMT/UTC secondo i parametri locali

Descrizione

gmstrftime(string $formato, int $timestamp = ?): string

Si comporta allo stesso modo della funzione strftime() eccetto che l'orario restituito è del Greenwich Mean Time (GMT). Ad esempio, quando si è nell' Eastern Standard Time (GMT -0500), la prima linea sotto scrive "Dec 31 1998 20:00:00", mentre la seconda scrive "Jan 01 1999 01:00:00".

Example #1 Esempio di gmstrftime()

setlocale ('LC_TIME', 'en_US');
echo strftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";
echo gmstrftime ("%b %d %Y %H:%M:%S", mktime (20,0,0,12,31,98))."\n";

Guarda anche strftime().

add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top