Hello,
I have xml like:
<programme start="20240805000022 +0300" stop="20240805235538 -0800" channel="Some Channel">
What is the recommended way to make it with zeroed seconds like this:
<programme start="20240805000000 +0300" stop="20240805235500 -0800" channel="Some Channel">
strange xml start is with +3hrs and stop -8hrs. Anyway if you want to round seconds i think sed can help. You can run the grab and then with a sed script round the seconds, although is a strange request. Just make sure you round to zero both start and stop otherwise it will be a mess.
My apologies for the confusion—the XML is actually in just one timezone; it was a mistake with copy/pasting. By the way, I believe I found a method to round the seconds:
index_start.modify {calculate(format=date,unix)}
index_stop.modify {calculate(format=date,unix)}
This approach seems to work for me, though I’m not certain it’s the most optimal solution.
What is the input from the site (the scrubbed data) for start/stop?
I receive a ready for use xml file for that channel and merge it. I don't know what is the original input.
date,unix is in seconds so it should make no difference.
index_start.modify {calculate(format=date,"dd-MM-yyyy HH:mm")}
index_stop.modify {calculate(format=date,"dd-MM-yyyy HH:mm")}
this should work as it doesnt use the seconds.
I don't know how and why, but format=date,unix works :)
format=date,"dd-MM-yyyy HH:mm" works too and I will be happy to use it.
Thanks for help