diff --git a/includes/functions/_service-posts.php b/includes/functions/_service-posts.php index b14988b1..46a7d11a 100644 --- a/includes/functions/_service-posts.php +++ b/includes/functions/_service-posts.php @@ -372,7 +372,7 @@ function fictioneer_chapter_future_to_publish( $new_status, $old_status, $post ) $story_id = get_post_meta( $post->ID, 'fictioneer_chapter_story', true ); if ( $story_id ) { - update_post_meta( $story_id, 'fictioneer_chapters_added', $post->post_date ); + update_post_meta( $story_id, 'fictioneer_chapters_added', $post->post_date_gmt ); } } add_action( 'transition_post_status', 'fictioneer_chapter_future_to_publish', 10, 3 ); diff --git a/includes/functions/_setup-meta-fields.php b/includes/functions/_setup-meta-fields.php index b552ec43..9a73ed8c 100644 --- a/includes/functions/_setup-meta-fields.php +++ b/includes/functions/_setup-meta-fields.php @@ -2413,7 +2413,7 @@ function fictioneer_save_story_metaboxes( $post_id ) { } if ( count( $previous_chapter_ids ) < count( $chapter_ids ) ) { - update_post_meta( $post_id, 'fictioneer_chapters_added', current_time( 'mysql' ) ); + update_post_meta( $post_id, 'fictioneer_chapters_added', current_time( 'mysql', true ) ); } // Log changes diff --git a/includes/functions/_utility.php b/includes/functions/_utility.php index 7f082e98..bf3ae947 100644 --- a/includes/functions/_utility.php +++ b/includes/functions/_utility.php @@ -1278,7 +1278,7 @@ function fictioneer_append_chapter_to_story( $post_id, $story_id, $force = false // Remember when chapter list has been last updated update_post_meta( $story_id, 'fictioneer_chapters_modified', current_time( 'mysql' ) ); - update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql' ) ); + update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql', true ) ); // Log changes fictioneer_log_story_chapter_changes( $story_id, $story_chapters, $previous_chapters ); diff --git a/includes/functions/settings/_settings_actions.php b/includes/functions/settings/_settings_actions.php index 3c27de81..672d1bb2 100644 --- a/includes/functions/settings/_settings_actions.php +++ b/includes/functions/settings/_settings_actions.php @@ -1601,7 +1601,7 @@ function fictioneer_tools_append_chapters() { // Remember when chapter list has been last updated update_post_meta( $story_id, 'fictioneer_chapters_modified', current_time( 'mysql' ) ); - update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql' ) ); + update_post_meta( $story_id, 'fictioneer_chapters_added', current_time( 'mysql', true ) ); // Clear meta caches to ensure they get refreshed delete_post_meta( $story_id, 'fictioneer_story_data_collection' );