Fixxer Posted December 18, 2007 Share Posted December 18, 2007 How can I make this display eastern time zone? $today = date("l, F j, Y, g:i a"); Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 18, 2007 Share Posted December 18, 2007 This should work (php5) - <?php date_default_timezone_set('America/New_York'); $today = date("l, F j, Y, g:i a"); echo $today; ?> Edit: Here is a different version that uses the EST abbreviation to figure out the timezone - <?php date_default_timezone_set(timezone_name_from_abbr("EST")); $today = date("l, F j, Y, g:i a"); echo $today; ?> Quote Link to comment Share on other sites More sharing options...
Fixxer Posted December 18, 2007 Author Share Posted December 18, 2007 hmm i must not have php5 then, the page doesnt even work then. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 18, 2007 Share Posted December 18, 2007 The end of life of php4 is in about 13 days. Except for security patches, no new development will occur for php4. Everyone should have a schedule in place for upgrading to php5. Quote Link to comment Share on other sites More sharing options...
Fixxer Posted December 18, 2007 Author Share Posted December 18, 2007 IDK i use w/e my web host (yahoo) uses. Quote Link to comment Share on other sites More sharing options...
PFMaBiSmAd Posted December 18, 2007 Share Posted December 18, 2007 Most web hosts have php5 available and it can either be selected through your control panel or by placing a statement in a .htaccess file. Check with your host on what method they have available. Those that don't upgrade will be left behind. Quote Link to comment Share on other sites More sharing options...
revraz Posted December 18, 2007 Share Posted December 18, 2007 What time zone is your server hosted in? Just do some basic math and add/subtract the number of hours to EST. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.