Jump to content

Date() and EST time


Fixxer

Recommended Posts

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;

?>

Link to comment
https://forums.phpfreaks.com/topic/82147-date-and-est-time/#findComment-417461
Share on other sites

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.

Link to comment
https://forums.phpfreaks.com/topic/82147-date-and-est-time/#findComment-417607
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.