Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My server time seems to be off on my Apache2 install, how do i fix this? Just running purely "date" in terminal returns the right time but im not sure how to login to apache2 and change it? This is on my local Desktop LAMP stack btw...

share|improve this question
    
What time is apache showing? Is it showing UTC? Which Ubuntu version are you using? –  Jeremy Bicha Jan 7 '11 at 16:51
    
It's about 6ish hours off. 10.10 – Oscar Godson –  Jeremy Bicha Jan 7 '11 at 16:51

1 Answer 1

PHP by default reports the current time in UTC (GMT) but in Debian & Ubuntu, it should instead be using the system time. Try running the phpinfo script by saving this text in var/www/phpinfo.php and then accessing http://localhost/phpinfo.php.

<?php 
  phpinfo();
?> 

The date section of this info page should tell you what timezone PHP is set to use.

share|improve this answer
    
I'm not sure what this answer has to do with Apache. The question doesn't mention PHP anywhere. –  BipedalShark Nov 4 '13 at 19:13

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.