• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Email timestamp to unix timestamp

#1
Hi, 
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.
Reply

#2
PHP Code:
$dt = new DateTime("Tue, 30 Oct 2018 07:00:08 +0000");
echo 
$dt->getTimestamp(); 

outputs 1540882808

PHP DateTime docs
Reply

#3
thank you very much, I did know that solution is so simple Smile
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.