I am working on a little plugin, and developed it on some wp version 2.2x
It creates a number of posts with post_status = 'draft' and a blank date.
Once all the posts are loaded, it then publishes some of them with todays date and post_status = 'publish'.
The rest of them are given future dates and post_status = 'future'.
All the manipulations are done using the wp_insert_post function. This works fine using version 2.2x and I get, say, half the posts posted today, and the others stepped over several weeks.
When I try and do this on version 2.3x I find that the posts are not scheduled properly, the first refresh of the blog shows the ones set to 'publish' but then the very next refresh shows the future posts. They still have the future dates, but their status has been set to publish by the refresh - telling me that the post schedule wasn't set up properly.
In 2.2x I notice that wp_schedule_single_event is called in wp_insert_post, but this appears to be no longer the case in 2.3x.
How, and why, has this been replaced, and how can I use the standard API to change existing post dates and status and make sure they are published in future correctly?