How to Adjust Server time in PHP

September 21, 2019

by Yunus Shaikh

As per your timezone you can adjust server time using php built-in functions.


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