Known issue: Wrong date URL if I publish later in the day

I’ve already reported this to the kind support folks who advised that this is a known issue, but I also wanted to share here in case others run into this. I didn’t see anything via forum search, though I think I saw something similar at some point related to UTC but not the URL.

My site is a news site and I am using both the date in the URL and a timestamp on my stories. Unfortunately - these two features do not play well together.

If I publish late in the day, the URL on my stories reflects tomorrow’s date.

Ghost support said that “it appears to be a known issue with Ghost at the moment, where Ghost will always use UTC, no matter what timezone the site is configured to use. At present, I do not have an ETA on when this will be resolved, but it is on our radar!”

Fortunately, the timestamp on my stories is reading local time - and I figure people are more likely to notice the date and time on the article vs what’s in the URL - so for now I think I’m just going to keep setting the time accurately and deal with an inaccurate URL.

My only concern is that somehow this may cause issues with search - Google, etc., reflecting an inaccurate time because of the wrong date in the URL. … so I guess I’ll just have to see how this goes after launch. Right now I’m still in the setup phase.

I could forgo the timestamp on my stories in favor of accurate URLs… or manually just put the pub time in the copy somewhere. But then I would potentially be back-timing my stories - which could cause its own issues in search … making things seem older than they are.

Neither option is ideal! I hope Ghost can fix this sooner rather than later.


Setup information

Ghost Version
Version: 5.7.0

How did you install Ghost?
Ghost(Pro)

Browser & OS version
MacOS Monterey 12.5, Chrome Version 103.0.5060.134

Hi @Berkeley_Scanner :slight_smile:

You’re correct that this is a known issue. It’s been around for a while, and we’ve looked into fixing it a couple of times, but the problem is the fix would be a serious breaking change for some older content.

Ghost’s dynamic routing functionality currently relies on generating all the URLs on the fly based on the current config. So that means if we fix the calculation for new URLs it will also impact all old URLs.

That means that if we fixed it today lots of your old posts that hit this issue would suddenly have a different URL, the old URL would 404 and the only way to resolve it would be to figure out which URLs changed and write manual 301 redirects.

I hope this explains why it’s not a trivial thing to resolve.

I would recommend that you switch to using URLs without dates & add a single 301 redirect rule to cover the change. I’ve researched this several times and found no evidence that Google or any other search engine ranks content better based on dates in the URL.

Alternatively, if you publish a post and you know the time is too late in the day, you can adjust the time in the publishing settings menu to be a couple of hours earlier and not encounter this issue - or you can schedule the content to go out at a good time the following day.

Thanks, I appreciate the info and time. Definitely food for thought. I do want dates in my URLs for multiple reasons. Most of my posts should be published early enough that it won’t be an issue, but it’s not always possible with breaking news.

Also, I just wanted to clarify, when you write: “If we fixed it today lots of your old posts that hit this issue would suddenly have a different URL, the old URL would 404 and the only way to resolve it would be to figure out which URLs changed and write manual 301 redirects.”

Are you saying it is possible to fix this for my site? Or that the solution would negatively impact others?

Because for me fixing it now would be preferable. I don’t really have any existing stories on my site that won’t be deleted prior to launch. I don’t personally have old posts - because I’m just getting set up now.

Thanks.

You could potentially patch your own site with a fix (I don’t have a patch, but it is possible to do), but that means re-patching on every upgrade. It’s not really sustainable.

I’m saying this is the reason we cannot add the fix to Ghost - too many existing sites would be impacted. To be honest I think our solution may well end up being dropping support for dated URLs.

Got it - just wanted to be sure I understood.

And when you say - dropped support for dated URLs - are you saying that could pose problems down the line?

Many news websites do use them. And I think it will make it easier for me to compile metrics and also do other admin things - as well as possible SEO benefits (although I know you said that’s not necessarily true).

Just to close the loop - when you say - “dropped support for dated URLs” - are you saying that could pose problems down the line?