Changing the timezone in Windows for ASP.NET and for PHP
Timezone configuration for ASP.NET:
- Login to the WebsitePanel.
- In your Hosting Space, please choose File Manager.
- Navigate to your website's wwwroot folder.
- Edit the web.config and add the following line (for Indian Date Time):
`
`
- After the changes are done, please click Save.
PS: Please note the timezone is set at the server level, so there isn't a way to override that per site. The way to handle that would be from your code. Set a timezone in your web.config and calculate the timezone on the fly based on that.
Timezone configuration for PHP:
You will need to open a ticket to our technical department requesting a custom PHP.INI for your website. After that please follow the steps below:
- Login to the WebsitePanel.
- In your Hosting Space, please choose File Manager.
- Navigate to your website's wwwroot folder.
- Edit the php.ini file located in the PHP folder and add the following line at the top of the file:
date.timezone = "US/Central"
PS: Replace "US/Central" with the timezone from here that corresponds to the time you want to display.
Updated 4 months ago