| 105 | | $_POST['post_date'] = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss ); |
| 106 | | $_POST['post_date_gmt'] = get_gmt_from_date( $_POST['post_date'] ); |
| | 105 | |
| | 106 | // Ensure a real, valid date here before saving to database |
| | 107 | // by converting to a Unix timestamp and then back |
| | 108 | $tmp_post_date = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss ); |
| | 109 | $tmp_post_date = strtotime( $tmp_post_date ); |
| | 110 | $tmp_post_date = date('Y-m-d H:i:s', $tmp_post_date ); |
| | 111 | |
| | 112 | $_POST['post_date'] = $tmp_post_date; |
| | 113 | $_POST['post_date_gmt'] = get_gmt_from_date( $tmp_post_date ); |
| 271 | | $_POST['post_date'] = "$aa-$mm-$jj $hh:$mn:$ss"; |
| 272 | | $_POST['post_date_gmt'] = get_gmt_from_date( "$aa-$mm-$jj $hh:$mn:$ss" ); |
| | 278 | |
| | 279 | // Ensure a real, valid date here before saving to database |
| | 280 | // by converting to a Unix timestamp and then back |
| | 281 | $tmp_post_date = sprintf( "%04d-%02d-%02d %02d:%02d:%02d", $aa, $mm, $jj, $hh, $mn, $ss ); |
| | 282 | $tmp_post_date = strtotime( $tmp_post_date ); |
| | 283 | $tmp_post_date = date('Y-m-d H:i:s', $tmp_post_date ); |
| | 284 | |
| | 285 | $_POST['post_date'] = $tmp_post_date; |
| | 286 | $_POST['post_date_gmt'] = get_gmt_from_date( $tmp_post_date ); |