cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Go to solution

Server Time

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

6 REPLIES 6
Helper V
Helper V
Solution

Re: Server Time

@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 .

 

Re: Server Time

Hi,

when you say 

.htaccess

which file you ment? 

Solution

Re: Server Time

1. create a file in file manager called .htaccess.

2. go to directory privacy in cpanel and "show hidden files" checkbox

3. go back to file manager and add the lines and save.

How to change SERVER TIME in cpanel

 How do I change server timezone to Sri Lankan time? GMT/UTC +5:30

Re: Server Time

How do I change server timezone to  GMT/UTC +4:00

Highlighted
Employee
Employee
Solution

Re: Server Time

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

 

Heather - GoDaddy | Community Moderator
24/7 support available at x.co/247support