PHP time conversion code for Unix timestamp

WBOY
Release: 2016-07-25 09:05:29
Original
857 people have browsed it
  1. /**
  2. Time Convert Unix Timestamp
  3. link: http://bbs.it-home.org
  4. */
  5. date_default_timezone_set('Asia/Chongqing');
  6. $time1 = "2013-02-16 08:40:54";
  7. $time2 = strtotime ($time1);
  8. echo $time2;
  9. echo date('Y-m-d h:i:s',$time2);
  10. ?>
Copy code


source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!