dezkit Posted March 23, 2008 Share Posted March 23, 2008 F d Y H:i:s T how do i make so that it say the time in EST time not GMT? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 23, 2008 Share Posted March 23, 2008 If you're using PHP 5, date_default_timezone_set() might help? Quote Link to comment Share on other sites More sharing options...
soycharliente Posted March 23, 2008 Share Posted March 23, 2008 I'm sure there's an easier way, but also? <?php $hour = date("H"); $min = date("i"); $sec = date("s"); $month = date("F"); $day = date("d"); $year = date("Y"); $offset = -5; echo date("F d Y H:i:s T", mktime($hour+$offset,$min,$sec,$month,$day,$year)); ?> I know you can also do things, like ... <?php date("F d Y H:i:s T", strtotime("+1 day")); ?> Maybe try playing around with ... <?php date("F d Y H:i:s T", strtotime("-5 hour")); ?> I've never messed around with it before so I don't know. Just some other things to think about. Quote Link to comment Share on other sites More sharing options...
dezkit Posted March 23, 2008 Author Share Posted March 23, 2008 :/ this is part of the code im using function tdatetime($ts){return date("F d, Y g:i A", $ts);} Quote Link to comment Share on other sites More sharing options...
Barand Posted March 23, 2008 Share Posted March 23, 2008 then you could apply Charlie's suggestion <?php function tdatetime($ts) { return date("F d, Y g:i A", strtotime('-5 hours', $ts)); } 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.