Human readable DB

Derick Rethans dr at ez.no
Mon Mar 30 07:32:02 UTC 2009


On Sun, 29 Mar 2009, Bennett, Billy wrote:

> I have a php script that takes the compiled timzone file and produces 
> a report you might find useful.  I have not published it yet, it was a 
> project from long ago that I lost the need for so the page has not 
> been kept up to date, but the program there works and may meet your 
> need.

Do you realize that PHP has this information already embedded? Since PHP 
5.1 we bundle a compressed/archive version of the Olson database and use 
it internally for all date/timezone operations. It's quite trivial to 
generate this data:

<?php
$a = new DateTimeZone( "America/New_York" );
$ts = $a->getTransitions(); 
var_dump( $ts );
?>


with kind regards,
Derick

-- 
http://derickrethans.nl | http://ezcomponents.org | http://xdebug.org
twitter: derickrethans



More information about the tz mailing list