Date in list is incorrect
See original GitHub issueCalling list()
is returning the wrong date. It’s an hour off (at least here on a danish computer GMT+2) and its missing seconds. Calling lastMod()
returns the right date. My guess is that the missing precision is due to the ftp command LIST
is not showing the seconds, but the hour off should be fixed in my oppinion.
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
Why is the “created date” incorrect in a SharePoint List or ...
If your dates appear to be wrong in SharePoint or Microsoft Lists there is a good chance that you haven't set the Regional...
Read more >SharePoint showing incorrect date - Power Platform Community
I have a flow that I am using to create SharePoint list item. I just realized that for some dates SharePoint showing incorrect...
Read more >Microsoft Lists Date/Time Settings Incorrect - AdamFowlerIT.com
Microsoft Lists Date/Time Settings Incorrect · Browse to office.com and sign in · Click the OneDrive app from the left hand menu ·...
Read more >Wrong date from SharePoint-List
Hi Community I have a problem with a report. I create a report from a sharepoint list. In the SP-List there is a...
Read more >Sharepoint List adjusted to Date/Time/Timezone & Using ...
Sharepoint List adjusted to Date/Time/Timezone & Using Locale showing incorrect time. I have a Sharepoint list that captures Start/End times ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As far as I know, the library is relying on the raw data returned by the command and doesn’t try to figure out the timezone on its own (you should check the raw data returned by the LIST command, I suspect they’ll be one hour off as well). The issue is not caused by the library directly, but because of the FTP protocol itself, and more particularly because of the LIST command, which has very loose specifications. The LIST command basically returns the output of a “ls” command and is not designed to handle timezones!
Two possible fixes :
NB: lastMod() issues a “MDTM” command, which returns an UTC timestamp. If it’s available on your FTP server, MLSD will probably be available as well since they were both defined in the same RFC (even though “MDTM” was around before being formalized into a RFC).
I’ve created a simple listMlsd function in my fork here: https://github.com/halfdanj/node-ftp It’s very basic, but is it something you want @mscdex?