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

Wrong modified time in Sublime text 3 #241

Open
Alecto opened this issue Oct 6, 2016 · 5 comments
Open

Wrong modified time in Sublime text 3 #241

Alecto opened this issue Oct 6, 2016 · 5 comments

Comments

@Alecto
Copy link

Alecto commented Oct 6, 2016

On the server, the correct time.
When I copy files manually - they are with correct time.
If synchronization is performed - they have wrong time (+3).
This problem has been known for a long time, has not yet been fixed?

show info:
http://image.prntscr.com/image/6f336ec7f3454d84b1b5b8290779dc92.png

i tried "time_offset" - It does not affect the time.

@bigrepository
Copy link

For some reason, i am encountering the same issue since switching to a new server ... my modified-time is +2hours to my local time (Austria UTC+1)... time_offset doesn't seem to have any effect.

@steve123go
Copy link

steve123go commented Oct 30, 2016

Same here.. after FTPSync update.. files on my server are 4 hours behind !

time_offset of 14400 does not help.

FTPSync MFMT:
getmtime: 1477839261.0587053
encoded: 20161030105421

@bigrepository
Copy link

Adding
"set_remote_lastmodified": false,
"time_offset": -60,
seems to fix it for now (at least in my case).

@steve123go
Copy link

steve123go commented Oct 30, 2016

that doesn't make sense but.. it works !
. . many thanks ! ( this beats the hell out of constant
cache clearing due to old timestamps : )

    "time_offset": -240, // [seconds]
    // "always_sync_local_permissions": true,

    // Only if the server has MFMT extension installed
     "set_remote_lastmodified": false,

@SylwesterZarebski
Copy link

SylwesterZarebski commented Jul 22, 2018

@bigrepository: setting set_remote_lastmodified to false disables MFMT completely, thus do not set time at all, just using transfer time.

The bug is probably in:

self.voidcmd("MFMT " + self.__encodeTime(os.path.getmtime(file_path)) + " " + path)

Which do not use time_offset at all.

Ok, i think proper fix would be change in ftpsyncwrapper.py line 1019 (method __encodeTime()):

        time = datetime.datetime.fromtimestamp(timestamp)

to

        time = datetime.datetime.utcfromtimestamp(timestamp)

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

No branches or pull requests

4 participants