• Stardates

    From Lawrence D'Oliveiro@21:1/5 to All on Fri Feb 16 23:17:12 2024
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From vallor@21:1/5 to ldo@nz.invalid on Sat Feb 17 08:15:19 2024
    On Fri, 16 Feb 2024 23:17:12 -0000 (UTC), Lawrence D'Oliveiro
    <ldo@nz.invalid> wrote in <uqoqdo$25h4$12@dont-email.me>:

    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.

    "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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Kenny McCormack@21:1/5 to ldo@nz.invalid on Sat Feb 17 12:38:33 2024
    In article <uqoqdo$25h4$12@dont-email.me>,
    Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
    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.

    ldo@theon:~> bc <<<"scale = 1; $(date +%s) / 86400"
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to vallor on Sat Feb 17 21:55:36 2024
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From candycanearter07@21:1/5 to Lawrence D'Oliveiro on Thu Feb 22 13:31:03 2024
    On 2/16/24 17:17, Lawrence D'Oliveiro wrote:
    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.

    As a nerd, I'm stealing this :) cant wait to make my .bashrc more bloated!
    --
    user <candycane> is generated from /dev/urandom

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Lawrence D'Oliveiro@21:1/5 to All on Fri Feb 23 01:43:14 2024
    On Thu, 22 Feb 2024 13:31:03 -0600, candycanearter07 wrote:

    As a nerd, I'm stealing this :) cant wait to make my .bashrc more bloated!

    Heh. ;)

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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)