-
Notifications
You must be signed in to change notification settings - Fork 31
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
conn.newer doesn't appear to work with Node v8+ #90
Comments
Same issue, this needs to be fixed asap. |
Thanks, I thought I was going crazy for a while lol |
After some testing, it appears to be a change in the way the times are retrieved with Adding
As you can see, it thinks the remote time is in CDT even though it's actually being retrieved in GMT. |
@morris I just tried looking in to this again, no luck. It seems like the local time is reporting accurately, but the remote time isn't. Can't figure out why. Any tips on where to look? |
Keep coming back to this with no success. No matter what I try, I can't get the server time to be reported correctly. I guess I'll just have to resort to manually specifying the offset for now. |
Now that Node v8 has moved in to LTS, it'd be awesome if this could be fixed. |
I have noticed this problem recently (Newest files not being uploaded). Looks like Nodejs is converting the date to UTC automatically. I am using this code as a workaround:
At mlsd.js Lines 91 to 100 in 10ba868
|
nandaleite's solution worked for me, thank you! running npm v 5.6.0, node v.8.9.4 |
Any news on this? |
Well I don't know if this is a proper solution but I had to install Node Version Manager (for windows go here and install the latest stable version I mean the one with the green label next to it). Once this is done open the CMD and run |
@jpacareu the title of this issue explicitly mentiones |
Commented earlier and deleted because I was wrong – I've now figured it out. This started occurring again after I switched from CommonJS syntax to ESM syntax. No idea why, I'm honestly not familiar enough with the difference to understand, I'm just now learning about ESM. It appears that Node.js's So, you can work around this by dynamically setting the /**
* Ensure timezone offset is set
*/
if (global.settings.ftp.timeOffset === null || global.settings.ftp.timeOffset === undefined) {
const DATE = new Date();
global.settings.ftp.timeOffset = DATE.getTimezoneOffset() * -1;
} This assumes that your server is set to GMT time, your configuration object is set to Super frustrating issue, but I think this is a good enough solution for me, at least for now. |
I have a Gulp task that uploads changed files, but since installing Node v8 (specifically tested with v8.1.2), it doesn't appear to be working correctly anymore; New files get added just fine, but old files never get replaced, unless I first delete them off the server, or remove the "newer" check.
I've just tested with an older version of Node (v6.10.3), and the task worked exactly as expected.
JacobDB/new-site/gulp-tasks/upload.js
The text was updated successfully, but these errors were encountered: