1
0
mirror of https://github.com/PDP-10/its.git synced 2026-02-26 17:03:20 +00:00

The file timestamps.txt is always in Eastern Standard Time.

This commit is contained in:
Lars Brinkhoff
2021-09-14 15:01:15 +02:00
parent 7dbcd82e50
commit 2dc0387284

View File

@@ -1,10 +1,13 @@
#!/bin/sh
# Update timestamps to those listed in the file passed as $1.
# Those timestamps are always in Eastern Standard Time.
# If there's no timestamp, we take the latest git author date.
list="$PWD/$1"
OTZ="$TZ"
export TZ
timestamps(){
for i in */*; do
@@ -13,8 +16,10 @@ timestamps(){
if test -n "$t"; then
set -- $t
t="$2"
TZ=EST
else
t=`git log -1 --date=format:%Y%m%d%H%M.%S --format=%cd -- "$1"`
TZ="$OTZ"
fi
touch -h -t "$t" -- "$i"
done