Andy-H Posted July 20, 2008 Share Posted July 20, 2008 Can anyone please tell me how to get the correct UK date in PHP, thanks for any answers. Quote Link to comment https://forums.phpfreaks.com/topic/115692-solved-newb-date-question/ Share on other sites More sharing options...
Andy-H Posted July 20, 2008 Author Share Posted July 20, 2008 I also need the date to be in the format of 0000-00-00 00:00:00 Quote Link to comment https://forums.phpfreaks.com/topic/115692-solved-newb-date-question/#findComment-594786 Share on other sites More sharing options...
DeanWhitehouse Posted July 20, 2008 Share Posted July 20, 2008 thats a timestamp format, please use google, and php manual http://uk.php.net/date Quote Link to comment https://forums.phpfreaks.com/topic/115692-solved-newb-date-question/#findComment-594788 Share on other sites More sharing options...
Andy-H Posted July 20, 2008 Author Share Posted July 20, 2008 ty Quote Link to comment https://forums.phpfreaks.com/topic/115692-solved-newb-date-question/#findComment-594789 Share on other sites More sharing options...
Andy-H Posted July 20, 2008 Author Share Posted July 20, 2008 <?php $ymd = date('Y-m-d'); $time = date('H:i:s'); $exp = explode(":", $time); $hour = $exp[0] + 5; $imp = array($hour,$exp[1],$exp[2]); $his = implode(":", $imp); $today = $ymd." ".$his; echo $today; ?> Did it that way, worked anyway lol Quote Link to comment https://forums.phpfreaks.com/topic/115692-solved-newb-date-question/#findComment-594792 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.