From 887d3dd1e2bcdb49d8cc57dbd986133cc68c27ba Mon Sep 17 00:00:00 2001 From: John Poole Date: Sat, 16 May 2026 08:03:38 -0700 Subject: [PATCH] time helpers --- scripts/compare_time.sh | 23 +++++++++++++++++++++++ scripts/compare_time_fast.sh | 16 ++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100755 scripts/compare_time.sh create mode 100755 scripts/compare_time_fast.sh diff --git a/scripts/compare_time.sh b/scripts/compare_time.sh new file mode 100755 index 0000000..0e53941 --- /dev/null +++ b/scripts/compare_time.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# compare_local_time.sh +# 20260516 ChatGPT +# $Header$ +# +# Infinite loop displaying only Local time from timedatectl. +# +# Example: +# chmod 755 compare_local_time.sh +# ./compare_local_time.sh +# +# Suggested side-by-side usage: +# ssh jlpoole@zerodev1 +# ./compare_local_time.sh +# +# ssh jlpoole@zerodev2 +# ./compare_local_time.sh + +while true +do + timedatectl status | grep 'Local time:' + sleep 1 +done diff --git a/scripts/compare_time_fast.sh b/scripts/compare_time_fast.sh new file mode 100755 index 0000000..9d652a1 --- /dev/null +++ b/scripts/compare_time_fast.sh @@ -0,0 +1,16 @@ +#!/bin/bash +# compare_local_time_fast.sh +# 20260516 ChatGPT +# $Header$ +# +# Faster/lighter infinite local time display. +# +# Example: +# chmod 755 compare_local_time_fast.sh +# ./compare_local_time_fast.sh + +while true +do + printf "Local time: %s\n" "$(date '+%Y-%m-%d %H:%M:%S.%3N %Z')" + sleep 0.2 +done