CodeIgniter date - wrong time -
i'm using:
date("d-m-y h:i:s")
in controller, time later actual time. example, in country it's 01:02, date return 20-06-2015 01:06:38.
how fix it?
1st step : go config/config.php
, write
//specify region date_default_timezone_set('europe/warsaw');
2nd step: can use time
date("d-m-y h:i:s") //for 21/12/2010 20:12:00 date("h:i:s") //for 12:12:11 time
Comments
Post a Comment