Hello,
I have Deluxe Linux Hosting with cPanel and i want to know my server time. I need to set it up for UTC time. Is it possible? Seems like my server time zone is America/Denver but my data center is Europe and i want my time zone to be UTC. Help please. Thanks
Solved! Go to Solution.
@PilotOmerAslan By default a Linux server will be set to UTC and then uses a Timezone to display the local time but can also be left on UTC. You will not be able to adjust the servers timezone however you can use .htaccess file or php to set timezone
Add the following to your .htaccess # Set Time to UTC SetEnv TZ UTC For PHP add one of the following putenv("TZ=UTC"); or date_default_timezone_set("UTC"); inside a php block in your website. (Unable to post the
complete php code as Godaddy is giving me an access denied .
Hi,
when you say
.htaccess
which file you ment?
How do I change server timezone to Sri Lankan time? GMT/UTC +5:30
How do I change server timezone to GMT/UTC +4:00
Hello @VigneshVijay!
Thank you for posting. You can use the guide at the beginning of this thread for adding scripting to your .htaccess file. I found a site that lists all of the countries you can enter here.