diff --git a/efingerd/nouser b/efingerd/nouser index 445a70c..07fc34c 100755 --- a/efingerd/nouser +++ b/efingerd/nouser @@ -7,34 +7,10 @@ if [ "$3" = "latest" ]; then fi if [ "$3" = "time" ]; then - GetJulianDay () { - year=$1 - month=$2 - day=$3 - jd=$((day - 32075 + 1461 * (year + 4800 - (14 - month) / 12) / 4 + 367 * (month - 2 + ((14 - month) / 12) * 12) / 12 - 3 * ((year + 4900 - (14 - month) / 12) / 100) / 4)) - printf "%s" "$jd" - } - - GetJulianTime () { - mil="$(echo "x = ($(date +%s) - 43200 ) % 86400; scale=5; x / 86400" | bc)" - printf "%s" "$mil" - } - - julian () { - year=$(date +"%Y") - month=$(date +"%m") - day=$(date +"%d") - - todayJd=$(GetJulianDay "$year" "$month" "$day") - timeJd=$(GetJulianTime) - - printf "%s%s\n" "$todayJd" "$timeJd" - } - echo The time is... d="$(date -u)" beatTAI=$(echo "x = ($(date +%s)) % 86400; scale=3; x / 86.4" | bc) - j=$(julian) + j=$(echo "x = $(date +%s); scale=5; x / 86400 + 2440587.5" | bc) printf "Gregorian Date : %s\n" "$d" printf "beatTAI : %s\n" "$beatTAI" printf "Julian Date : %s\n" "$j"