I have php 4.4 version i am getting a strange error here.

echo strtotime("2009-04-24T20:00:05.000Z");

It is giving result as -1

What is the problem and how to overcome this.
I dont have an option for php upgradation.

Recommended Answers

All 4 Replies

That means that your time string is invalid. It can't read it.

Have you looked at php.net?

The same thing if i test in PHP 5.4.4 or above then it is working fine.

Its not the version, its the time string.

it will work in php5

try this in php4

echo strtotime("2009-04-24 20:00:05");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.