Friday, July 15, 2016

Changing Timezone in phpDolphin

phpDolphin is a social network script based in PHP. While playing with the script for the first time, I noticed that everything I posted the post time always started with "4 hours ago". It didn't look too good, LOL. I wrote an email asking for some help. The script author is nice enough to help solving the problem within a day. Now that is some kind of support! :)

So, I was told that the "4 hours ago" problem was due to the fact that the server's time was not synced with the MySQL database. To fix this problem, the following line is added to the file includes/config.php

date_default_timezone_set("Etc/GMT+4");


Now everything looks right. If you just post something, the post message will be "seconds ago". Btw, if you are also using phpDolphin and happen to encounter some sort of SMTP mail server error, need to put additional fields in your profile page, or want to edit footer links, please check out my other blog post here.