Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Stardates

24 views
Skip to first unread message

Lawrence D'Oliveiro

unread,
Feb 17, 2024, 8:17:16 AM2/17/24
to
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.

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

At one point I was using this for version numbers for my Android apps.

vallor

unread,
Feb 17, 2024, 5:15:24 PM2/17/24
to
On 2024年2月16日 23:17:12 -0000 (UTC), Lawrence D'Oliveiro
<l...@nz.invalid> wrote in <uqoqdo25ドルh4$1...@dont-email.me>:
"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

unread,
Feb 17, 2024, 9:38:37 PM2/17/24
to
In article <uqoqdo25ドルh4$1...@dont-email.me>,
Lawrence D'Oliveiro <l...@nz.invalid> wrote:
>Heres a command that produces date/time numbers reminiscent of
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

Lawrence D'Oliveiro

unread,
Feb 18, 2024, 6:55:40 AM2/18/24
to
On 2024年2月17日 08:15:19 -0000 (UTC), vallor wrote:

> "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.

Yeah, but those are integers. Adding a decimal point makes it a bit more,
I don’t know ... stardatey.
0 new messages