Home Forums PHP Adjust Server Time According to Your Local Time – PHP

This topic contains 0 replies, has 1 voice, and was last updated by  Usman Haider 3 years, 2 months ago.

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #665

    Usman Haider
    Keymaster

    Your server time is not always exactly what your local time is. For this purpose you have to adjust it manually using PHP by using this code:

    In above code i have subtracted 2 hours from your server’s time. You can adjust it by adding or subtracting the number of hours from your server time for adjusting it with your local time. For adding, you can use “+ 2 hour” instead of “- 2 hour”.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.