Author: Jeremy
-
Use Google As a Crutch For Your Cheap Website Host
Almost every site I create nowadays relies heavily on JavaScript. Having to load in all those scripts can really bog your web server down. Instead of serving those static files yourself, why not use Google? It provides a free service called Google AJAX Libraries that hosts all of the popular JavaScript libraries. Google makes this…
-
Easy Way to Convert UTC to Current Timezone in PHP
$utc_time = “2009-01-12 21:28:21”; // As pulled from the database date_default_timezone_set(“America/New_York”); // Set to Eastern time (automatically handles daylight savings time) // Here’s the secret: add a Z (for zulu) to the end of your UTC date/time string $utc_time .= “Z”; // Now convert to the current timezone $cur_date = strftime(“%G-%m-%d %H:%M:%S”, strtotime($utc_time)); // Format…