Jump to content

php: date() an incorrect value in module. Why?


Ronaldo Perez

Recommended Posts

My thought is because your prestashop config file or somewhere in the back office you have set the timezone for your shop. When you call date() from test.php, you are not inheriting any controller or config information from the back office (assuming that test is not a controller with a class extending any of prestashops classes/controllers). That's my guess as to why it's showing different values.

  • Like 1
Link to comment
Share on other sites

My thought is because your prestashop config file or somewhere in the back office you have set the timezone for your shop. When you call date() from test.php, you are not inheriting any controller or config information from the back office (assuming that test is not a controller with a class extending any of prestashops classes/controllers). That's my guess as to why it's showing different values.

 

Yes, I have had the same thought, probably somewhere set

date_default_timezone_set ('tz'); //tz - shop timezone

 

I thought that datetime takes an immutable value of the server, I made ​​a mistake

 

justini, bellini13 - many thanks

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...