0

I'm converting my mysql timestamp with

$timeStampDate=date("F j, Y g:i a", strtotime($row["projectTimeStamp"]));

Unfortunately a new php version doesn't like this, and is giving me a set of errors.

Strict Standards: strtotime() [function.strtotime]: It is not safe to rely on the system's timezone settings. 

I've been playing with .htaccess, adding php_value date.timezone Europe/London but it's a problem.

I just need the mysql NOW() to be readable in a $variable.

I hate software updates. PHP Version 5.2.17

2 Answers 2

2

You have to set default timezone with date_default_timezone_set()

Sign up to request clarification or add additional context in comments.

2 Comments

This is correct, I just fixed it with date_default_timezone_set('Europe/London');
Sorry, I tried to accept it but I needed to wait a designated time. @Tom No need to be rude is there?
1

Or in php.ini: datetime.timezone

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.