project Utilities / File Location Listing avatar

utilities/file_location_listing#28: Invalid Last-Mod Date format



Issue Information

Issue Type: issue
Status: closed
Reported By: btasker
Assigned To: btasker

Milestone: v0.2.1
Created: 01-Jan-24 11:52


Labels: Bug

Description

Just noticed the last mod date on an item in the results

Screenshot_20240101_115018

Unless we've started 0 indexing months, that's not possible.

Other dates look OK, so I'm guessing we've used a %M instead of %m somewhere



Toggle State Changes

Activity


assigned to @btasker

The API response is correct

Screenshot_20240101_115333

So it must be on the Javascript side.

verified

mentioned in commit aa72335e83fc5168bc4780a39f0547e6e5fb1f41

Commit: aa72335e83fc5168bc4780a39f0547e6e5fb1f41 
Author: B Tasker                            
                            
Date: 2024-01-01T11:57:14.000+00:00 

Message

fix: shift months to be 1 indexed (utilities/file_location_listing#28)

+1 -1 (2 lines changed)

The underlying issue was that we're calling Javascript's Date.getMonth() which is 0 indexed.

So, although the other dates look correct, they were actually all off by 1 month.

mentioned in issue #29