Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed lastMod to interpret MDTM time as GMT #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

limikael
Copy link

The function lastMod relies on the FTP command MDTM. The MDTM command returns time strings that look like 19990929043300 meaning 1999-09-29 04:33:00. According to RFC 3659 these times are in GMT, which makes sense. However, they were passed directly into the constructor for a Date object, meaning they were interpreted as local time. By adding a Z to the end of the string so it looks like 1999-09-29T04:33:00Z the Date constructor will interpret them correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant