Am saving time in integer format in mysql but its saved on a different timezone
This is the code that a using
$model->created_at = time();
This sets time in integer format eg :1483881886
The problem is that when i reconvert this time to hrs minutes and sec it points into a different timezone
I have also tried
date_default_timezone_set('Africa/Nairobi');
then
$model->created_at = time(); //the timezone is not set
How do i configure timezone in the unix time() function