I have a laravel application and am trying to save user checks and checks in my database
I have a Checkins model and I write it as created_at and updated_at
on my local host it will save with the right time for my timezome (Egypt), I tried to change the app.php file to the next
|-------------------------------------------------------------------------- | Application Timezone |-------------------------------------------------------------------------- | | Here you may specify the default timezone for your application, which | will be used by the PHP date and date-time functions. We have gone | ahead and set this to a sensible default for you out of the box. | | This is a bad thing really i think there is a problem within the server, the datetime */ 'timezone' => 'EET',
it works fine on my local host and saves with the current correct time, for saving it with the UTC time zone
Also, when I write the date command date in the production terminal, I get the following
Tue Mar 31 12:46:38 EET 2015
and I checked mysql for timezone and I found that it gets time from system time
SELECT @@global.time_zone, @@session.time_zone; SYSTEM
What is wrong here?
UPDATE:
I created a php page with date('H:i:s'); and printed the right time
source share