[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fractional file timestamps in tramp-adb
From: |
Michael Albinus |
Subject: |
Re: fractional file timestamps in tramp-adb |
Date: |
Thu, 14 Feb 2019 21:23:00 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Paul Eggert <address@hidden> writes:
Hi Paul,
> A downside of the new approach is that it assumes POSIX.1-2008 or
> later, but I guess that's OK nowadays. An upside is that 'touch -d'
> lets one specify the fractional part of the timestamp, and also lets
> one specify that the timestamp is UTC by appending "Z" (I don't see
> how the current code is arranging for UTC). So, how about the attached
> followup patch? It would change the format to:
>
> touch -d 2019-02-14T18:23:17.318491822Z file
It doesn't work, at least on my Galaxy S6:
--8<---------------cut here---------------start------------->8---
$ touch -d 2019-02-14T18:23:17.318491822Z /sdcard/tmp/foo
touch: bad '2019-02-14T18:23:17.318491822': Value too large for defined data
type
--8<---------------cut here---------------end--------------->8---
It runs Android 7.0, as identified by Tramp:
--8<---------------cut here---------------start------------->8---
$ echo \"`getprop ro.product.model` `getprop ro.product.version` `getprop
ro.build.version.release`\"
"SM-G920F 7.0"
--8<---------------cut here---------------end--------------->8---
OTOH, touch doesn't work at all on my device, because it isn't rooted:
--8<---------------cut here---------------start------------->8---
$ touch -d 2019-02-14T18:23:17 /sdcard/tmp/foo
touch: '/sdcard/tmp/foo': Operation not permitted
--8<---------------cut here---------------end--------------->8---
But that's another story; I don't want to modify my device that way.
Best regards, Michael.