Discussion:
Stardates
(too old to reply)
Lawrence D'Oliveiro
2024-02-16 23:17:12 UTC
Permalink
Here’s a command that produces date/time numbers reminiscent of
“stardates”: days (and fractions of a day) since 00:00:00 1-Jan-1970 UTC,
aka the Unix epoch.

***@theon:~> bc <<<"scale = 1; $(date +%s) / 86400"
19769.9

At one point I was using this for version numbers for my Android apps.
vallor
2024-02-17 08:15:19 UTC
Permalink
On Fri, 16 Feb 2024 23:17:12 -0000 (UTC), Lawrence D'Oliveiro
Post by Lawrence D'Oliveiro
Here’s a command that produces date/time numbers reminiscent of
“stardates”: days (and fractions of a day) since 00:00:00 1-Jan-1970 UTC,
aka the Unix epoch.
19769.9
At one point I was using this for version numbers for my Android apps.
"No. of days since the Epoch" is also used in
(some?) /etc/shadow files to indicate
when a password expires, as well as
when it was last set.
--
-v
Kenny McCormack
2024-02-17 12:38:33 UTC
Permalink
Heres a command that produces date/time numbers reminiscent of
stardates: days (and fractions of a day) since 00:00:00 1-Jan-1970 UTC,
aka the Unix epoch.
19769.9
At one point I was using this for version numbers for my Android apps.
Nifty. You could also do (this is more typing, but seems cleaner to me):

$ gawk 'BEGIN { printf "%.1f\n",systime()/86400 }'
--
"I have a simple philosophy. Fill what's empty. Empty what's full. And
scratch where it itches."

Alice Roosevelt Longworth
candycanearter07
2024-02-22 19:31:03 UTC
Permalink
Post by Lawrence D'Oliveiro
Here’s a command that produces date/time numbers reminiscent of
“stardates”: days (and fractions of a day) since 00:00:00 1-Jan-1970 UTC,
aka the Unix epoch.
19769.9
At one point I was using this for version numbers for my Android apps.
As a nerd, I'm stealing this :) cant wait to make my .bashrc more bloated!
--
user <candycane> is generated from /dev/urandom
Lawrence D'Oliveiro
2024-02-23 01:43:14 UTC
Permalink
Post by candycanearter07
As a nerd, I'm stealing this :) cant wait to make my .bashrc more bloated!
Heh. ;)

And I’ve never even met Captain Zlog ...

Loading...