Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

system time is different than apache timestamp --?

Im on a development server. When i do this in php:

echo date('r',time());

response: Tue, 01 Jun 2010 18:10:32 -0400

However, my computer's time is 17:10:32 (im on GMT -5). Where do i configure my apache/php to change this setting? i've looked in php.ini and httpd.conf already.

Thanks

like image 898
Andres SK Avatar asked Jun 01 '10 22:06

Andres SK


1 Answers

Edit your php.ini file and add the following code in the Date section

[Date]
; Defines the default timezone used by the date functions
; http://php.net/date.timezone
date.timezone = America/Guayaquil

That will define the timezone for all your php pages.

like image 84
Nicolas Avatar answered Oct 24 '22 16:10

Nicolas