Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-loadTZ

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  loadTZ   Lines 338-368 (30 lines)Added: 2012-04-06 file  utilsCoords.php   Last mod: Tue 2021-04-06 21:34:28

function loadTZ $TZfile )
        {
#-k     geo
#-      loads the tz.txt file to build an array of TZ elements
#-d     04/06/12 - added

        
$lod file $TZfile );
        unset(
$lod[0]); # skip header line

        
foreach ($lod as $tz)
                {
                
$tz str_replace 'UTC'''$tz );
                
$tz str_replace "'"'`'$tz );
                
$t explode "        "trim($tz) );
                
$x convertCoords ($t[1]);
                if (
$t[3] == '-'$t[3] = '';
                
$t[4] = str_replace "-""_"$t[4] );
                
$t[4] = str_replace '/'"_"$t[4] );
                if (!
validateVariable $t[4] )) eko $t[4] );

                
$ar[$t[4]]['cc']        = $t[0];
                
$ar[$t[4]]['winter']    = $t[2];
                
$ar[$t[4]]['summer']    = $t[3];
                
$ar[$t[4]]['lat']       = $x['lat']['SD'];
                
$ar[$t[4]]['lon']       = $x['lon']['SD'];
                
$ar[$t[4]]['notes']     = $t[5];
                }

        return 
$ar;
        }

?>