mktime bug, Date Output doesn't same with the input


/ Published in: PHP
Save to your folder(s)

This is strange, timestamp from this date 30 Jan 2012 doesn't output the same date from mktime


Copy this code and paste it in your HTML
  1. //PHP Version 5.3.0
  2. date_default_timezone_set('Asia/Jakarta');
  3. //date 2012-01-30 00:00:00
  4. $timestamp = mktime(0,0,0,30,1,2012);
  5. echo date('Y-m-d H:i:s',$timestamp);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.