How to correct IMG time ?

Advanced Renamer forum
#1 : 05/12-22 14:25
Jerry Malinar
Jerry Malinar
Posts: 2
Hi !

I use rename method to change standard photo file name (i.e. DJI_0001.jpg) into meaningful and sortable file name (i.e. 2022.12.05_14.21.00.jpg).

<IMG Year>.<IMG Month>.<IMG Day>_<IMG Hour>.<IMG Min>.<IMG Sec>

Unfortunately, the camera didn't jump from summer to winter time, so I have to correct it:
<IMG Year>.<IMG Month>.<IMG Day>_(<IMG Hour>-1).<IMG Min>.<IMG Sec>

Please, help me with syntax (brackets etc.).

Thank You, Jerry


05/12-22 14:25
#2 : 05/12-22 14:41
David Lee
David Lee
Posts: 1125
I've answered this question several times. See my reply to https://www.advancedrenamer.com/forum_thread?for um_id=13251

You will need to modify the separators in the regex in the "match" statement and also in the return statement:

match = item.name.match(/^(\d{4}).(\d{2}).(\d{2})_(\d{2})\.(\d{2})\.(\d{2})/);


05/12-22 14:41
#3 : 05/12-22 15:21
Jerry Malinar
Jerry Malinar
Posts: 2
Thank You very much David !

But regex and jscripting are too much for me. :(
I'm just a simple mortal creature. ;)


05/12-22 15:21
#4 : 09/12-22 12:15
Tommy
Tommy
Posts: 1
Amazing information.
I really enjoyed reading this thread and discussion by the people.


09/12-22 12:15