On Thu, Dec 29, 2011 at 18:03, Clark J. Wang <[email protected]> wrote:
> I find that printf's `%T' format can recognize time strings like "2 days
> ago" or "10 hours later" which is really cool. But then I find that 1000 is
> a magic number for %T. See following examples:
>
> $ echo ${.sh.version}
> Version jM 93u 2011-02-08
> $ printf '%T\n' '1000 days ago'
> Wed Dec 28 10:00:00 CST 2011
> $ printf '%T\n' '1000 minutes ago'
> Thu Dec 29 09:59:00 CST 2011
> $ printf '%T\n' '1000 seconds ago'
> ksh: printf: warning: invalid argument of type T <-- ???
> Thu Dec 29 10:00:00 CST 2011
>
I forgot to mention that 999 works fine here.
$ printf '%T\n' '999 seconds ago'
Thu Dec 29 20:06:18 CST 2011
> $
> $ printf '%T\n' '201201010101.01 999 days ago'
> Tue Apr 7 01:01:01 CST 2009
> $ printf '%T\n' '201201010101.01 1000 days ago'
> ksh: printf: warning: invalid argument of type T <-- ???
> Sun Jan 1 01:01:01 CST 2012
> $
>
> I'm confused. Is there a specification about the exact time strings
> supported by ksh?
>
> -Clark
>
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users