Recipe
# You need a recent curl version. Hence, my path points to a compiler curl version
# The goal is to manage when new MAJ should be done instead of running full processing for nothing
curl_path=/home/thomasg/curl/bin/curl
mydate=$($curl_path -Ls -o /dev/null --head -w "%header{last-modified}" https://planet.openstreetmap.org/pbf/planet-latest.osm.pbf)
current_date=$(date -d "$mydate" +"%Y-%m-%dT%H:%M:%S%:z")