vscode-deploy-reloaded
vscode-deploy-reloaded copied to clipboard
checkBeforeDeploy comparing timestamps incorrectly for FTP deploy
Description
This seems to be a similar issue to https://github.com/mkloubert/vscode-deploy-reloaded/issues/84 but the solution there didn't work for me. What happens is that when comparing timestamps, the local file uses the host time, and the remote file uses the server's time, making the comparison wrong since they're on different times. This makes that checkBeforeDeploy will trigger the "confirm operation" popup even when it's unnecessary.
Actual behavior
Uploaded file is newer than server file, but I'm still warned that server file is newer. Then when the tool shows the comparison of both files, it's using different timestamps.
Expected behavior
It should allow to set the server time (or the time difference) so it uses that information to calculate timestamp differences and determine which file is actually newer.
Steps to reproduce
- Enable checkBeforeDeploy in target
- Upload file that's newer than server file, but that has a timestamp smaller than the local machine <-> server difference
Example: local machine is 3 hours behind server time. Upload file with timestamp 1 pm machine time. Server file has timestamp of 4 pm server time. Even though file being uploaded is newer, checkBeforeDeploy warns that it's not based on timestamps.
Example config
{
"deploy.reloaded": {
"targets": [
{
"type": "ftp",
"name": "My Deploy place",
"dir": "/",
"host": "host",
"port": 21,
"user": "username",
"password": "password",
"checkBeforeDeploy": true,
"checkBeforePull": true,
}
],
}
}
Your environment
- Operating system: OSX 10.14.2
- Visual Studio Code version: 1.3.2
- Extension version: 0.86
Additional comments
Awesome extension still!
I have some trouble.
Time on server = Time on client + 1, because the Daylight saving time settings are different.
After deploy the file on server has time due the deploy process.
- Operating system: Windows 10.17763.437
- Visual Studio Code version: 1.33.1
- Extension version: 0.87.2
- Engine: jsftp, ftp