d: skip leading zeros

This commit is contained in:
2024-05-13 16:25:56 +03:00
parent 1ec9ce3753
commit 0b1970ee4b

View File

@@ -240,7 +240,7 @@ in {
}; };
initExtra = '' initExtra = ''
t() { git rev-parse --show-toplevel; } t() { git rev-parse --show-toplevel; }
d() { date --utc --date=@$(echo "$1" | sed -E 's/^[^0-9]*(.{10}).*/\1/') +"%F %T"; } d() { date --utc --date=@$(echo "$1" | sed -E 's/^[^1-9]*([0-9]{10}).*/\1/') +"%F %T"; }
source ${./gg.sh} source ${./gg.sh}
''; '';
}; };