Forum und email

gmdate

(PHP 4, PHP 5)

gmdate — Formatează data/timpul GMT/CUT

Descriere

string gmdate ( string $format [, int $timestamp ] )

Este identică cu funcţia date() cu excepţia faptului că timpul rezultat este Greenwich Mean Time (GMT). De exemplu, când este rulat în Romania (GMT +0300), prima linie de mai jos va afişa "Jan 01 1998 00:00:00", în vreme ce a doua va afişa "Dec 31 1997 22:00:00".

Example#1 Exemplu gmdate()

echo date ("M d Y H:i:s", mktime (0,0,0,1,1,1998));
echo gmdate ("M d Y H:i:s", mktime (0,0,0,1,1,1998));

Vezi, de asemenea, date(), mktime(), gmmktime() şi strftime()