I like the base idea of Laurent S to make sure you have the very same conditions when you run your tests. As long as you do not consider security an issue I'd agree on using md5.
As you are very unspecific about the meta-data that is different on every run I got curious and made a short test.
zip t1 t00*png
zip t2 t00*png
Now some meta- change:
touch t00*.png
zip t3 t00*png
Result:
md5sum *.zip
760a4a1c52f3bc6cdd29c1fff7b94c1f t1.zip
760a4a1c52f3bc6cdd29c1fff7b94c1f t2.zip
83a8dcb9fe0d50e7b2b8012c8842005e t3.zip
This implies that - at last my version of zip [1] does produce repeatable content as long as no metadata is changed.
Your changes are - per definition - not part of the files content (e.g. JPEG's EXIF Data is also metadata, but part of the file - while file access date is not). Otherwise you would have no chance to use any hash- function at all.
So if you want a comparable result while the files contents are the same but their metadata (the file-system's metadata) isn't you'd save a huge amount of effort by just tweaking the metadata.
As you are doing some kind of unit- test here you could even use this as a validation of the md5-sum being identical with tweaked metadata and different without.
Proof of concept:
touch t00*.png -d '2000-01-01T0:00'
zip t1 t00*png
touch t00*.png -d
zip t2 t00*png
touch t00*.png -d '2000-01-01T0:00'
zip t3 t00*png
Result:
md5sum *.zip
a1e713c1d91a0042b37043c83bb98d1b t1.zip
3085aa53bee69df4be783636b87ed62c t2.zip
a1e713c1d91a0042b37043c83bb98d1b t3.zip
Last but not least you can try to tweak those areas of your ZIP- File that are not relevant for your test. As ZIP seems to be a well- behaving container format the metadata of my changes show up in neat distances - hardening my assumption that they are headers/footers per file:
cat t1.zip| xxd -ps -c 20 > t1.hd
cat t2.zip| xxd -ps -c 20 > t2.hd
diff t1.hd t2.hd
1c1
< 504b03041400000008000000212822aad7cacc0b
---
> 504b0304140000000800c37a574a22aad7cacc0b
3c3
< 09000370356d3870356d3875780b000104e80300
---
> 0900030df0ae580df0ae5875780b000104e80300
3432c3432
< 6082504b030414000000080000002128143698a4
---
> 6082504b0304140000000800c37a574a143698a4
3434c3434
< 555409000370356d3870356d3875780b000104e8
---
> 55540900030df0ae580df0ae5875780b000104e8
19691,19693c19691,19693
...
Note the obviously minimal differences caused by the metadata- change.
[1] Linux 4.9.9-1-ARCH #1 SMP PREEMPT Thu Feb 9 19:07:09 CET 2017 x86_64 GNU/Linux, <br>
Zip 3.0 (July 5th 2008), by Info-ZIP, Compiled with gcc 5.3.0 for Unix (Linux ELF) on Jan 12 2016.