[Bug]: Date format defined in settings not used when parsing the ID3 date tag. #1491

Closed
opened 2026-04-24 23:47:19 +02:00 by adam · 3 comments
Owner

Originally created by @CSuerig on GitHub (Oct 28, 2023).

Describe the issue

the date ID3 metadata tag, is always parsed using the format mm.dd.yyyy, ignoring the date format set in the settings.
So for example, something which has the 05.12.2023 (dd.mm.yyyy) as date, will show as published 12.05.2023.

The metadata in the example below was created using:

ffmpeg -i "$file" -i "Cover.png" -c copy -map 0 -map 1 -metadata artist="Fritz Egner" -metadata album="Fritz und Hits" -metadata title="Fritz und Hits Sendung vom ${day}.${month}.${year}" -metadata date="${day}.${month}.${year}" "FritzUndHits.mp3"

grafik

Steps to reproduce the issue

  1. add ID3 tag 05.12.2023 to an mp3, which is a podcast episode
  2. set your date format in the settings to dd.mm.yyyy
  3. copy the podcast episode into a podcast folder, and rescan it
  4. look under library --> click on the podcast, and view the published date.

Audiobookshelf version

v2.4.4

How are you running audiobookshelf?

Docker

Originally created by @CSuerig on GitHub (Oct 28, 2023). ### Describe the issue the date ID3 metadata tag, is always parsed using the format mm.dd.yyyy, ignoring the date format set in the settings. So for example, something which has the 05.12.2023 (dd.mm.yyyy) as date, will show as published 12.05.2023. The metadata in the example below was created using: ffmpeg -i "$file" -i "Cover.png" -c copy -map 0 -map 1 -metadata artist="Fritz Egner" -metadata album="Fritz und Hits" -metadata title="Fritz und Hits Sendung vom ${day}.${month}.${year}" -metadata date="${day}.${month}.${year}" "FritzUndHits.mp3" ![grafik](https://github.com/advplyr/audiobookshelf/assets/14974225/a5128f5d-e2dd-4a93-b8a1-90024d8ecc67) ### Steps to reproduce the issue 1. add ID3 tag 05.12.2023 to an mp3, which is a podcast episode 2. set your date format in the settings to dd.mm.yyyy 3. copy the podcast episode into a podcast folder, and rescan it 4. look under library --> click on the podcast, and view the published date. ### Audiobookshelf version v2.4.4 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:47:19 +02:00
adam closed this issue 2026-04-24 23:47:20 +02:00
Author
Owner

@advplyr commented on GitHub (Oct 28, 2023):

The date format server setting is for displaying dates, not parsing them.

The podcast ID3 tags aren't documented yet. Ideally the date format you use would follow the same specification that RSS feed pubDate's use. RFC-822

The date ID3 tag is converted to a javascript Date object then stored in the database as a unix timestamp, like this:

https://github.com/advplyr/audiobookshelf/blob/a9f74ace5abf9d17c74e2f5d2811ab3b004af3a5/server/scanner/AudioFileScanner.js#L424-L426

If we pass 05.12.2023 into the javascript Date constructor it gets parsed as 2023-05-12

image
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date

@advplyr commented on GitHub (Oct 28, 2023): The date format server setting is for displaying dates, not parsing them. The podcast ID3 tags aren't documented yet. Ideally the date format you use would follow the same specification that RSS feed pubDate's use. [RFC-822](https://www.rssboard.org/rss-draft-1#data-types-datetime) The date ID3 tag is converted to a javascript Date object then stored in the database as a unix timestamp, like this: https://github.com/advplyr/audiobookshelf/blob/a9f74ace5abf9d17c74e2f5d2811ab3b004af3a5/server/scanner/AudioFileScanner.js#L424-L426 If we pass `05.12.2023` into the javascript Date constructor it gets parsed as `2023-05-12` ![image](https://github.com/advplyr/audiobookshelf/assets/67830747/65837d35-3067-4430-8e1e-f715a6cf43b6) https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
Author
Owner

@CSuerig commented on GitHub (Oct 29, 2023):

Thank you for clarification. I updated the date fields and this works fine for me.

@CSuerig commented on GitHub (Oct 29, 2023): Thank you for clarification. I updated the date fields and this works fine for me.
Author
Owner

@LaserKaspar commented on GitHub (Aug 7, 2025):

Hey, sorry to tune into this old thread.

I have my files tagged "correctly" and now I would need to put non standard values in my files to make ABS read the whole date out of the Year field.

So I am wondering why the date of an episode is only parsing the TYER Tag of ID3:

https://github.com/advplyr/audiobookshelf/blob/e510174f12c1b0216fd41e682383253106293a89/server/utils/prober.js#L185

These are not official docs for ID3 but they look quite complete/consistent:
https://mutagen-specs.readthedocs.io/en/latest/id3/

TDRL (Release Time) or TDRC (Recording Time) in v2.4.0
https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2.4.0-frames.html

TYER (Year), TDAT (Day and Month), TIME (Time) or/and? TRDA (Free-form text but is meant for Recording Date) in v2.3.0
https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2.3.0.html

Happy to hear any feedback from you (:

@LaserKaspar commented on GitHub (Aug 7, 2025): Hey, sorry to tune into this old thread. I have my files tagged "correctly" and now I would need to put non standard values in my files to make ABS read the whole date out of the Year field. So I am wondering why the date of an episode is only parsing the TYER Tag of ID3: https://github.com/advplyr/audiobookshelf/blob/e510174f12c1b0216fd41e682383253106293a89/server/utils/prober.js#L185 These are not official docs for ID3 but they look quite complete/consistent: https://mutagen-specs.readthedocs.io/en/latest/id3/ TDRL (Release Time) or TDRC (Recording Time) in v2.4.0 https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2.4.0-frames.html TYER (Year), TDAT (Day and Month), TIME (Time) or/and? TRDA (Free-form text but is meant for Recording Date) in v2.3.0 https://mutagen-specs.readthedocs.io/en/latest/id3/id3v2.3.0.html Happy to hear any feedback from you (:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1491