# HG changeset patch # User HackEso # Date 1546637413 0 # Node ID 06331fefa90d06b9c405324a88d3e13f3ee8f6ce # Parent d2b36b28643dbd55647a0ec6336dd3a5444cfdb3 perl -e for $e ("i","u"){ $f="bin/date$e"; open my$i,"<",$f or die "error open $f r"; local$/; $s=<$i> or die; $s=~s/"\\+%Y/\\${1:+-d "\\$1"} $&/ or die; open $o,">",$f or die "error open $f w: $!"; print $o $s or die; close $o or die; print "OK $f\\n" } diff -r d2b36b28643d -r 06331fefa90d bin/datei --- a/bin/datei Fri Jan 04 21:29:43 2019 +0000 +++ b/bin/datei Fri Jan 04 21:30:13 2019 +0000 @@ -1,2 +1,2 @@ #!/bin/sh -exec date "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u" +exec date ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u" diff -r d2b36b28643d -r 06331fefa90d bin/dateu --- a/bin/dateu Fri Jan 04 21:29:43 2019 +0000 +++ b/bin/dateu Fri Jan 04 21:30:13 2019 +0000 @@ -1,2 +1,2 @@ #!/bin/sh -exec date -u "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u" +exec date -u ${1:+-d "$1"} "+%Y-%m-%d %H:%M:%S.%N %z %Z %B %-e %A %G-W%V-%u"