/hphp/test/zend/good/ext/date/tests/strtotime.php

http://github.com/facebook/hiphop-php · PHP · 12 lines · 11 code · 1 blank · 0 comment · 0 complexity · 1b59c8653b6712d1838eef7c3a8c16c3 MD5 · raw file

  1. <?hh <<__EntryPoint>> function main(): void {
  2. date_default_timezone_set('Europe/Oslo');
  3. $d = varray[];
  4. $d[] = strtotime("2005-07-14 22:30:41");
  5. $d[] = strtotime("2005-07-14 22:30:41 GMT");
  6. $d[] = strtotime("@1121373041");
  7. $d[] = strtotime("@1121373041 CEST");
  8. foreach($d as $date) {
  9. echo date(DATE_ISO8601, $date), "\n";
  10. }
  11. }