2

Trying to change string like

Tue Jun 28 15:24:51 +0000 2011

to php unix time.

Found this Parsing Twitter API Datestamp but strtotime returns -1 for me.

echo strtotime('Fri Apr 09 12:53:54 +0000 2010');

Any ideas? Probably hosting problems?

Thanks

This dinosaurs use PHP 4.4.9, so code doesn't work. I added

AddType x-mapp-php5 .php

and it starts to work:)

1
  • 1
    Which PHP version do you run? Commented Jul 1, 2011 at 9:55

1 Answer 1

2
$date = strtotime('Fri Apr 09 12:53:54 +0000 2010');
echo date('d/m/Y',$date);
echo $date;

Works for me. Check the the PHP version compability:
strtotime() api

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

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.