Skip to content

Instantly share code, notes, and snippets.

@simonesestito
Created March 27, 2022 17:10
Show Gist options
  • Save simonesestito/1d701331cab219955c23693de787572e to your computer and use it in GitHub Desktop.
Save simonesestito/1d701331cab219955c23693de787572e to your computer and use it in GitHub Desktop.
WhatsApp timestamp fix
#!/bin/bash
cd /sdcard/Android/media/com.whatsapp/WhatsApp/Media
while read path; do f=$(basename "$path"); touch -d "${f:4:4}-${f:8:2}-${f:10:2}T12:00:00z" "${path}"; done < <(find . -regextype posix-extended -regex ".*/[[:alpha:]]{3}-[[:digit:]]{8}-.*")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment