gboudreau / XBMCnfoTVImporter.bundle

358 stars 69 forks source link

Originally Available date off by one #130

Open Hannah-GBS opened 1 year ago

Hannah-GBS commented 1 year ago

I know this hasn't been updated in a long time and nobody's likely to see this but it's driving me nuts.

I set an aired date for (eg) 20230729. I can see in the plugin logs this is correctly parsed as 2023-07-29 and set to episode.originally_available_at.

However, in Plex, when the metadata for the episode is parsed it displays as the 28th of July, instead of the 29th. This happens for every episode, the date displays 1 day earlier than the NFO is set to and the logs show. I tried changing the plugin from the parse function it uses to the Datetime.ParseDate that some of Plex's own agents use but had the same effect. Log shows correct date parsed, Plex shows different.

Server and Client are on the same timezone, though whether timezone could otherwise be affecting it I don't know. If it was then I'd expect it to happen to other agents using the same parse function anyway.

Hannah-GBS commented 1 year ago

Okay so this is a timezone/DST thing.

Checked more thoroughly and episodes dated between late March and late October are 1 day out, ie when my system is on BST instead of GMT. Episodes dated for the rest of the year display correctly.