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

Metadata querying: specify the arrow of time for Last-Modified queries #134

Open
Xe opened this issue Dec 6, 2024 · 0 comments
Open

Metadata querying: specify the arrow of time for Last-Modified queries #134

Xe opened this issue Dec 6, 2024 · 0 comments

Comments

@Xe
Copy link
Contributor

Xe commented Dec 6, 2024

While I was on stream, I was confused at the "directionality" of time in X-Tigris-Query calls. Specifically, I wanted to get objects that were a week older or more. The example shows this:

`Last-Modified` > "2024-06-23T10:38:46Z"

I wasn't sure if this meant everything before or after the given point in time. I now understand that to get what I want, I needed to do code like this:

t := time.Now().AddDate(0, 0, -7)
aWeekAgo := t.Format(time.RFC3339)
q := fmt.Sprintf("`Content-Type` = \"application/vnd.docker.distribution.manifest.v2+json\" AND `Last-Modified` < %q", aWeekAgo)

Document this and the "arrow of time".

@Xe Xe assigned Xe and unassigned Xe Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant