Skip to content

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

@Xe

Description

@Xe

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".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions