Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hugo list future/expired ignores clock flag #11888

Closed
olikami opened this issue Jan 15, 2024 · 3 comments · Fixed by #12052
Closed

hugo list future/expired ignores clock flag #11888

olikami opened this issue Jan 15, 2024 · 3 comments · Fixed by #12052
Assignees
Milestone

Comments

@olikami
Copy link

olikami commented Jan 15, 2024

What version of Hugo are you using (hugo version)?

$ hugo version
hugo v0.121.2-6d5b44305eaa9d0a157946492a6f319da38de154+extended darwin/arm64 BuildDate=2024-01-05T12:21:15Z VendorInfo=brew

Does this issue reproduce with the latest release?

Yes


When running hugo list future the --clock option is ignored.

For example, I have the following page:

---
title: "A few Hugo Shortcodes"
date: 2024-01-22T00:00:00
---
bla bla

This is the output of hugo list future as right now:

% hugo list future                                       
path,slug,title,date,expiryDate,publishDate,draft,permalink
content/posts/2024-01-22 Hugo Shortcodes/index.md,,A few Hugo Shortcodes,2024-01-22T00:00:00+01:00,0001-01-01T00:00:00Z,2024-01-22T00:00:00+01:00,false,https://oli.fyi/2024/a-few-hugo-shortcodes/

And this is the output if I try to set the clock for later:

% hugo list future --clock "2024-01-25T00:00:00.00+01:00"
path,slug,title,date,expiryDate,publishDate,draft,permalink
content/posts/2024-01-22 Hugo Shortcodes/index.md,,A few Hugo Shortcodes,2024-01-22T00:00:00+01:00,0001-01-01T00:00:00Z,2024-01-22T00:00:00+01:00,false,https://oli.fyi/2024/a-few-hugo-shortcodes/

I would expect this to not be a future page anymore, having set the clock on the 25th. It does work, and it will build it after the 22nd, but the future command is not working.

@jmooring
Copy link
Member

Same issue with expired content.

@jmooring jmooring changed the title hugo list future ignores clock options hugo list future/expired ignores clock options Jan 15, 2024
@jmooring jmooring changed the title hugo list future/expired ignores clock options hugo list future/expired ignores clock flag Jan 15, 2024
@jmooring
Copy link
Member

This is regression introduced in v0.112.0, related to the fix for #10972.

@bep bep added this to the v0.123.0 milestone Jan 31, 2024
@bep bep self-assigned this Feb 17, 2024
bep added a commit to bep/hugo that referenced this issue Feb 17, 2024
bep added a commit that referenced this issue Feb 17, 2024
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants