3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<?php date_default_timezone_set('Europe/Madrid'); //$time = mktime(12,0,0,1,15,2013); $now = mktime(8,28,0,2,17,2014); $last = mktime(8,28,0,2,10,2014); $agoraMadrid = date("d/m/Y H:i:s", $now); $lastMadrid = date("d/m/Y H:i:s", $last); //date_default_timezone_set('America/Sao_Paulo'); date_default_timezone_set('Etc/GMT+2'); $agoraAqui = date("d/m/Y H:i:s", $now); $lastAqui = date("d/m/Y H:i:s", $last); date_default_timezone_set('America/Bahia'); $agoraLa = date("d/m/Y H:i:s", $now); $lastLa = date("d/m/Y H:i:s", $last); printf("17-02-2014\n"); printf("Madrid %-20s\n", $agoraMadrid); printf("Sao Paulo %-20s\n", $agoraAqui); printf("\n10-02-2014\n"); printf("Madrid %-20s\n", $lastMadrid); printf("Sao Paulo %-20s\n", $lastAqui);