osmupdate between 2 timestamps (planet.openstreetmap.org)

I’m working on a OpenStreetMap project and I want to have a .osc file containing data between 2 timestamps with the command osmupdate.

For example osmupdate NOW-3600 change_file.osc works perfectly, and will give me all the data from the timestamp at this time and one hour in advance. But now I want to get data between 2 timestamps for example 2022-06-05T06:00:00Z and 2022-06-05T06:30:00Z (30 minutes difference).

osmupdate 2022-07-06T09:30:00Z file.osc also works perfectly and will give me a file containing the data starting from that timestamp until now. This is where I’m searching mostly: https://wiki.openstreetmap.org/wiki/Osmupdate/tech, But I don’t find a way to do this.

Thanks in advance!

I don’t know if osmupdate allows what you want, and apparently pyosmium-get-change does not. However you may find the later easy to modify to specify a end timestamp.

https://docs.osmcode.org/pyosmium/latest/tools_get_changes.html#pyosmium-get-changes-py