Forum

Thread tagged as: Question, Runway, Blog

Blog Post Published Earlier Than I Set

Every once in a while, a blog post that is set to post on a certain day in the future, will end up posting on save or earlier (I haven't figured out exactly when it's happening).

Does anyone know why that might happening?

Leigh C

Leigh C 0 points

  • 3 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

If the correct date is entered and the server's clock is right then that shouldn't happen, no.

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

It might be worth checking the value of PERCH_TZ in your perch/config/config.php. If it is set to a different time zone from the one you're working from, it could be the cause.

Leigh C

Leigh C 0 points

Thanks - though it's been posting drafts properly, so if the config was wrong, it would consistently post at the wrong times.

But that said, I checked the config/config.php file and I don't see PERCH_TZ as an option. Doesn't it pull the from the server? Or should I set it manually with an additional PERCH_TZ line in the config?

Hussein Al Hammad

Hussein Al Hammad 105 points
Registered Developer

Doesn't it pull the from the server?

Perch uses the timezone of the server by default. If the server's clock is set to the same timezone you need, then you shouldn't need to do anything.

However, if the server is set to a different timezone from the one you need, you can define the timezone you want Perch to use in config.php. For example:

define('PERCH_TZ', 'Europe/Rome');

When you first start a new post, the default value of the date field is set to the current date and time. If you start a new post and the date or time is different from what you're expecting, then defining the desired timezone in config.php may solve your problem.