CodeIgniter Forums

Full Version: Email timestamp to unix timestamp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I do some processing in email box. 
I need to convert timestamp in email header to unix timestamp.
I don't know which format uses email for time formatting.
example email date format is:
Tue, 30 Oct 2018 07:00:08 +0000

I googled but could not find solution. 

Thank you in advance.
PHP Code:
$dt = new DateTime("Tue, 30 Oct 2018 07:00:08 +0000");

outputs 1540882808

PHP DateTime docs
thank you very much, I did know that solution is so simple Smile