+10 votes
1.3k views
in Programming by (3.5k points)
Hi I have a centos server that is configured with Spanish time with the date command shows me the correct time but the problem I have in php shows me one hour earlier, I have figured asin php.ini with: 
 
[date] 
date.timezone = Europe / Madrid 
 
restart apache but still does not work, in that I turn the line shows me the correct time but I get an error telling me that I can not trust the system time, there are functions in php to set the time to your country but I set it up on the server for my php functions show well without. 
Any recommendation or I'm failing. 
Greetings.

2 Answers

+11 votes
by (201k points)
as I recall (years ago I do not use PHP) the property must use it date_default_timezone_set 
 
Also you'll be seeing a difference for DST, if applicable.
+12 votes
by (18.3k points)
Uses info.php to check if you are actually taking the correct time.
Ask a Question
Welcome to WikiTechSolutions where you can ask questions and receive answers from other members of the community.

You can ask a question without registration.

Categories

...