My php code is returning 1970-01-02 instead of the entered date of birth. I'm using the following code:
$date_of_birth = date('Y-m-d', strtotime('+1 day', strtotime(get_post_meta( $post_id, 'date_of_birth', true ))));
My php code is returning 1970-01-02 instead of the entered date of birth. I'm using the following code:
$date_of_birth = date('Y-m-d', strtotime('+1 day', strtotime(get_post_meta( $post_id, 'date_of_birth', true ))));
From PHP Doc Note:
Prior to PHP 5.1.0, not all platforms support negative timestamps, therefore your date range may be limited to no earlier than the Unix epoch. This means that e.g. dates prior to Jan 1, 1970 will not work on Windows, some Linux distributions, and a few other operating systems.
So I suspect this problem is somewhat related to your PHP version and also your OS. Could you specify all these information?
Regards,