Adjust Server Time

Sometimes the time set on your server isn't accurate to what your local time is. If you can't change it, you can adjust it yourself.

PHP CODE

$today = date('Y-m-d-G');

$today = strftime("%Y-%m-%d-%H", strtotime("$today -5 hour"));

If your server thought it was 12 midnight, but it was really 7 pm, this will roll the $today variable back five hours to be correct.

 

 

0   0
Brajesh  Roy

Please rotate your device

We don't support landscape mode on your device. Please rotate to portrait mode for the best view of our site