• @[email protected]
    link
    fedilink
    English
    12 months ago

    My favorite thing is purging remote cached media.

    You need a timestamp, which is fine.

    You just need to figure out how many miliseconds since the unix epoch the media you want to purge was uploaded, and then offset the time to only purge that old or older.

    Easy!

    • @marcos
      link
      English
      32 months ago

      So, you need a unix time value followed by 000?

      That first part you can calculate with date +%s -d '2024-07-02 12:00'.

      • @[email protected]
        link
        fedilink
        English
        22 months ago

        I ended up doing basically that.

        Current time in ms, minus 2629800000 (a month) = timestamp to use to prune from.