Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Hi Mr.p
#--How to run--#
#1. Download then use steps per platform
#Linux: with bash, within working dir ./calculate.sh, make sure to allow exc
#Mac: Should work but minor difrents in corutilities may cause some dif, not sure if 'bc' works on mac so floating point calculations may fail
#Windows: Install linux subsystem then use linux instructions
read -p 'Name output file: ' filename
read -p 'duration of test: ' test
@okwes
okwes / immich_date_shift.py
Created October 29, 2024 04:15
Immich Bulk Date Shift. The Immich web ui only supports setting one time for many assets, this code allows the date of many assets to be shifted by x days, seconds etc. This will shift the date/time for all photos in a given album
# under CC0/Public Domain. Do as you like. NO WARRANTY
# make venv, pip install requests python-dateutil
# Replace the 3 variables at the top and adjust the function call for adjust_iso8601_time() to suit your desired time change for all photos in the album you give.
# Better code may exist but this is a quick fix to a problem I had
import requests
from datetime import datetime, timedelta
from zoneinfo import ZoneInfo
import json