How can we change timezone of your PHP website?

kumkumsharma

Administrator
Staff member
If your server timezone is different and you are getting issue in your PHP script then you can simply solve this issue at your end. You just have to create php.ini file in your account and add single line of code.
  • Login to cpanel.
  • Click on “File manager” under “Files”.
  • Navigate to public_html folder or any other folder in which you have your website.
  • Here search for created php.ini file and if there is not any file, then you can create it.
  • Now you have to add below code in our file.
date.timezone = “US/Central”

  • You can use required timezone instead of “US/Central”.
  • Click on “Save changes”.
 
Top