Issue
I am having problems with PHPMyAdmin and Laravel 5.1 on a Ubuntu 14.04 virtual server, whenever I shut the server down the timezone (date and time) slips back by the amount of time the server has been shut down for.
I've set the timezone in both php.ini on the server and app.php in Laravel to
'timezone' => 'Australia/Sydney',
Does anyone know a command line command that I can execute for re-setting the time back to the above when the virtual server is re-started?
Solution
After struggling with the date and time being in-sync sometimes and not other times, I've discovered that the following steps do reset the time to the correct time. In the database in PhpMyAdmin, click the SQL tab and run the following SQL query
SELECT @@global.time_zone, @@session.time_zone;
Then back in the VirtualBox command line switch to 'root' user, run the following command
set default-time-zone
Then reboot the server
sudo reboot
When it re-boots you should have the correct time and date displayed, you may need to go through the last two steps a couple of times to get the correct time and date, and check the ip address as it may have changed
ifconfig
Hope this helps somebody else
Answered By - zod
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.