Date Sorting - reading format incorrectly

Report & discuss bugs found in SABnzbd
Forum rules
Help us help you:
  • Are you using the latest stable version of SABnzbd? Downloads page.
  • Tell us what system you run SABnzbd on.
  • Adhere to the forum rules.
  • Do you experience problems during downloading?
    Check your connection in Status and Interface settings window.
    Use Test Server in Config > Servers.
    We will probably ask you to do a test using only basic settings.
  • Do you experience problems during repair or unpacking?
    Enable +Debug logging in the Status and Interface settings window and share the relevant parts of the log here using [ code ] sections.
Post Reply
nt4os
Newbie
Newbie
Posts: 2
Joined: August 21st, 2022, 11:18 pm

Date Sorting - reading format incorrectly

Post by nt4os »

I am using Date Sorting for one category of download but the SAB Date Sorting script is reading the date wrong.

I have a file name with a date format of 22.07.14. It converts it to 2014-07-22 instead of the correct date of 2022-07-14. I don't see any switches or configuration I can change to fix this.

Is there anything simple I can do to fix this?

Thanks,
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Date Sorting - reading format incorrectly

Post by safihre »

No there isn't. But thanks for reporting this, as it looks like something we should maybe fix in the backend.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
sander
Release Testers
Release Testers
Posts: 8811
Joined: January 22nd, 2008, 2:22 pm

Re: Date Sorting - reading format incorrectly

Post by sander »

I wonder how you can "fix" this. It depends on country how "10-11-12" is interpreted: 10 nov 2012, or 2010 nov 12, or 2010 11 december.

SAB cannot know if it's DMY or YMD or even MDY.

The solution ... quote from See https://en.wikipedia.org/wiki/Date_format_by_country :

"The ISO 8601 format YYYY-MM-DD (2022-08-20) is intended to harmonize these formats and ensure accuracy in all situations. Many countries have adopted it as their sole official date format, though even in these areas writers may adopt abbreviated formats that are no longer recommended."
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Date Sorting - reading format incorrectly

Post by safihre »

I agree Sander, that is also what nt4os wants: 22.07.14 should be 2022-07-14. Right now Guessit interpreted it as the European-style.
Luckily it has an option to change that.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
User avatar
safihre
Administrator
Administrator
Posts: 5338
Joined: April 30th, 2015, 7:35 am
Contact:

Re: Date Sorting - reading format incorrectly

Post by safihre »

Fixed it.
If you are on Windows or macOS, you can download the fixed release here in a few minutes:
https://github.com/sabnzbd/sabnzbd/acti ... 2906014599
(requires GitHub account)
Otherwise, it will be in the next release.
If you like our support, check our special newsserver deal or donate at: https://sabnzbd.org/donate
nt4os
Newbie
Newbie
Posts: 2
Joined: August 21st, 2022, 11:18 pm

Re: Date Sorting - reading format incorrectly

Post by nt4os »

thank you very much for the fast fix and understanding. I will grab the update and give it a try.

Regards,
Post Reply