Is there a way in foobar2000 to also get the timezone offset? That is, can you format the string as YYYY-MM-DD HH::MM:SS+ZZ
? This would make it easier to get the offset by reading the +ZZ or -ZZ instead of subtracting local_time from listened_at.
Looking at your example code, I have a few comments:
- you submit a listened_at_iso - is this something that you added? I don’t see that we report it in the documentation as a suggested field. I do agree that it’s a good field to include.
- I see that the format of listened_at_iso and local_time is different. The listened_at has T between date/time and has a timezone (Z) at the end
- local_time and listened_at are off by 1 second. Perhaps this is because as you fill in each field you get the current time again. I don’t know foobar2k scripting - can you get the date once and use that value to format each field?