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

Stardates

17 views
Skip to first unread message

Lawrence D'Oliveiro

unread,
Feb 16, 2024, 6:17:16 PMFeb 16
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, 3:15:24 AMFeb 17
to
On Fri, 16 Feb 2024 23:17:12 -0000 (UTC), Lawrence D'Oliveiro
<l...@nz.invalid> wrote in <uqoqdo$25h4$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, 7:38:37 AMFeb 17
to
In article <uqoqdo$25h4$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 17, 2024, 4:55:40 PMFeb 17
to
On Sat, 17 Feb 2024 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