And IMO even more useful:

$ printf '%(%Y-%m-%d+%H:%M:%S)T\n' 'Oct 27 12:34'
2012-10-27+12:34:00

________________________________
> From: [email protected] 
> Date: Wed, 31 Oct 2012 09:19:02 +0800 
> To: [email protected] 
> CC: [email protected] 
> Subject: Re: [ast-users] using ksh93 printf "%T" to convert dates from  
> ls -l to absolute dates? 
>  
> On Wed, Oct 31, 2012 at 3:56 AM, Dan Shelton  
> <[email protected]<mailto:[email protected]>> wrote: 
> Can ksh93 printf "%T" be used to convert dates from ls -l to absolute 
> dates? I get dates from ls -l like "Oct 27", which is relative to the 
> current year. But I want the fully qualified date and time stamp (i.e. 
> with YYYY) based on the input string "Oct 30 14:32". Can printf %T do 
> that for me? 
>  
> $ printf '%T\n' 'Oct 27 12:34' 
> Sat Oct 27 12:34:00 CST 2012 
> $ 

                                          
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to