Scheduling posts on wordpress adds wrong seconds as post_date

When scheduling a post in wordpress, e.g. 15:50, I always see that as time there are always seconds added at the end, e.g. 15:50:48, which ruins my cronjobs and makes them run 1 minutes later (if I run wp cron every minute), because if a post is scheduled for 15:50:48, it will not be posted on the cron for 15:50:00-01, instead it will wait a minute later. My question is why is wordpress adding random seconds when scheduling (like 48 seconds or 58 seconds?) which I haven’t defined at all.

Edit: Easily this can be reproduced when you schedule any post at any time (e.g. 17:50) and look up in the database. You would see something like 17:50:48 for the post_date.
Example

0

Leave a Comment