Ticket #3729: 3729-0006-extfs-uarc-fix-date-format.patch

File 3729-0006-extfs-uarc-fix-date-format.patch, 1.2 KB (added by mooffie, 6 years ago)
  • src/vfs/extfs/helpers/uarc.in

    From bdbf4b4f5e3e277e48295d2462ec208ba29f60c8 Mon Sep 17 00:00:00 2001
    From: Mooffie <mooffie@gmail.com>
    Date: Mon, 12 Dec 2016 14:23:50 +0200
    Subject: [PATCH 06/13] Ticket #3729: extfs: uarc: fix date format.
    
    Use "MM-DD-YYYY hh:mm" instead of "Mon DD YYYY hh:mm".
    ---
     src/vfs/extfs/helpers/uarc.in | 10 ++++++++--
     1 file changed, 8 insertions(+), 2 deletions(-)
    
    diff --git a/src/vfs/extfs/helpers/uarc.in b/src/vfs/extfs/helpers/uarc.in
    index 8c1a006..2ddee8b 100644
    a b mc_arc_fs_list() 
    2424        fi 
    2525    fi 
    2626    $ARC_LIST "$1" | @AWK@ -v uid=$UID ' 
    27 BEGIN { } 
     27BEGIN { 
     28  # Copied from uzoo.in. 
     29  split("Jan:Feb:Mar:Apr:May:Jun:Jul:Aug:Sep:Oct:Nov:Dec", month_list, ":") 
     30  for (i=1; i<=12; i++) { 
     31    month[month_list[i]] = i 
     32  } 
     33} 
    2834/^Name/ { next } 
    2935/===/ { next } 
    3036/^Total/ { next } 
    BEGIN { } 
    4551                a[2]=substr(a[2],1,2) 
    4652        } 
    4753 
    48         printf "-rw-r--r--   1 %-8d %-8d %8d %s %2d %4d %02d:%02d %s\n", uid, 0, $2, $7, $6, $8, a[1], a[2], $1 
     54        printf "-rw-r--r--   1 %-8d %-8d %8d %02d-%02d-%04d %02d:%02d %s\n", uid, 0, $2, month[$7], $6, $8, a[1], a[2], $1 
    4955}' 2>/dev/null 
    5056    exit 0 
    5157}