<p dir="ltr">I always assumed it was just the same literal T as in the ISO spec: <a href="https://en.m.wikipedia.org/wiki/ISO_8601">https://en.m.wikipedia.org/wiki/ISO_8601</a></p>
<div class="gmail_extra"><br><div class="gmail_quote">On Oct 16, 2016 14:02, "Rob Landley" <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Posix<br>
<a href="http://pubs.opengroup.org/onlinepubs/9699919799/utilities/touch.html" rel="noreferrer" target="_blank">http://pubs.opengroup.org/<wbr>onlinepubs/9699919799/<wbr>utilities/touch.html</a><br>
specifies -d as:<br>
<br>
  -d  date_time<br>
<br>
  Use the specified date_time instead of the current time. The option<br>
  argument shall be a string of the form:<br>
<br>
    YYYY-MM-DDThh:mm:SS[.frac][tz]<br>
<br>
  or:<br>
<br>
    YYYY-MM-DDThh:mm:SS[,frac][tz]<br>
<br>
  where:<br>
...<br>
    T is the time designator, and can be replaced by a single <space>.<br>
<br>
The problem is, it doesn't say what a "time designator" is. The two<br>
other hits for "designator" in this page are:<br>
<br>
  If the T time designator is replaced by a <space> for the -d<br>
  date_time option-argument, the <space> must be quoted to prevent<br>
  the shell from splitting the argument.<br>
<br>
and<br>
<br>
  The -d date_time format is an ISO 8601:2000 standard complete<br>
  representation of date and time extended format with an optional<br>
  decimal point or <comma> followed by a string of digits following<br>
  the seconds portion to specify fractions of a second. It is not<br>
  necessary to recognize "[+/-]hh:mm" and "[+/-]hh" to specify<br>
  timezones other than local time and UTC. The T time designator in<br>
  the ISO 8601:2000 standard extended format may be replaced by<br>
  <space>.<br>
<br>
The touch man page is useless (and points me at the info page, which I'm<br>
not reading).<br>
<br>
Googling for "posix time designator" brought up wikipedia pages on unix<br>
time (numeric seconds since 1970), an "epoch coverter" web page where<br>
you type in a time and it converts  it, and then<br>
<a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&uact=8&ved=0ahUKEwj6rZrzj-DPAhVH2oMKHb94BPQQFggrMAI&url=http%3A%2F%2Fwww.cl.cam.ac.uk%2F~mgk25%2Fiso-time.html&usg=AFQjCNH7F2PiT1zZ22oAVRzQxGByEdcrfA" rel="noreferrer" target="_blank">https://www.google.com/url?sa=<wbr>t&rct=j&q=&esrc=s&source=web&<wbr>cd=3&cad=rja&uact=8&ved=<wbr>0ahUKEwj6rZrzj-<wbr>DPAhVH2oMKHb94BPQQFggrMAI&url=<wbr>http%3A%2F%2Fwww.cl.cam.ac.uk%<wbr>2F~mgk25%2Fiso-time.html&usg=<wbr>AFQjCNH7F2PiT1zZ22oAVRzQxGByEd<wbr>crfA</a><br>
is the first possibly relevant hit (isn't it FUN how google mangles<br>
links when you right click copy link?) but it does not include the word<br>
"designator". So that's nice.<br>
<br>
The _examples_ on the posix page all use "T" for the "designator", so<br>
that's what I made my code do when I wrote it. But somebody complained<br>
(who I promised to stop listening to after they complained about my<br>
'wall of text" instead of just taking the "simple" memcpy->memmove<br>
patch), and although I'm not replying directly to them a bug report's a<br>
bug report...<br>
<br>
I checked what busybox is doing, and they're funneling stuff through a<br>
large complicated library function that hardwires in a dozen different<br>
formats checking them in a lage if/else staircase, and among those are<br>
two that accept this format with "-" or " " as "designators". (But not<br>
"T" which is what the posix examples use...)<br>
<br>
Does anybody know what this field is supposed to _mean_? And/or have an<br>
actual use case in the wild using touch -d?<br>
<br>
Rob<br>
______________________________<wbr>_________________<br>
Toybox mailing list<br>
<a href="mailto:Toybox@lists.landley.net">Toybox@lists.landley.net</a><br>
<a href="http://lists.landley.net/listinfo.cgi/toybox-landley.net" rel="noreferrer" target="_blank">http://lists.landley.net/<wbr>listinfo.cgi/toybox-landley.<wbr>net</a><br>
</blockquote></div></div>