From ecee7fc33370e0bbff03d3d86fea2d1bf9fcc360 Mon Sep 17 00:00:00 2001 From: Lingnan Dai Date: Mon, 30 Sep 2019 20:27:02 +0100 Subject: [PATCH] fix touch timestamp; duplicate of #39 --- adb-sync | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adb-sync b/adb-sync index 3b4eaf6..8379dbf 100755 --- a/adb-sync +++ b/adb-sync @@ -303,14 +303,14 @@ class AdbFileSystem(GlobLike, OSLike): # TODO(rpolzer): Find out why this does not work (returns status 255). """Set the time of a file to a specified unix time.""" atime, mtime = times - timestr = time.strftime('%Y%m%d.%H%M%S', + timestr = time.strftime('%Y%m%d%H%M.%S', time.localtime(mtime)).encode('ascii') if subprocess.call( self.adb + [b'shell', b'touch -mt %s %s' % (timestr, self.QuoteArgument(path))]) != 0: raise OSError('touch failed') - timestr = time.strftime('%Y%m%d.%H%M%S', + timestr = time.strftime('%Y%m%d%H%M.%S', time.localtime(atime)).encode('ascii') if subprocess.call( self.adb +