News for hackers. Stuff that matters.
Re:Show HN: A programmable tooltip on Mac OS by jan_g on Monday April 20, 2020 @09:05AM (#22923468)
> Copying a millisecond-from-epoch number, visiting a website that can convert it to human-readable date, pasting the number, and hitting enter

I use the builtin `date` utility for this specific task, instead of querying another webpage to translate it.

    $ date -r 1577733633
    Mon Dec 30 20:20:33 CET 2019
Re:Show HN: A programmable tooltip on Mac OS by iandev on Monday April 20, 2020 @11:11AM (#22924494)
Also worth noting that you can pipe the result to `pbcopy` to put it in your clipboard. Super useful if you haven't seen it before.

    $ date -r 1577733633 | pbcopy
Re:Show HN: A programmable tooltip on Mac OS by sportsaw on Monday April 20, 2020 @07:10PM (#22929899)
I think the example was silly, but think about finding the epoch in, say, a log file. With this system you could just click and see the human readable. With the date command you'd have to switch to terminal, type "date -r", paste, enter.
Re:Show HN: A programmable tooltip on Mac OS by wjdp on Monday April 20, 2020 @11:05AM (#22924420)

    date -r 1577733633
    date: 1577733633: No such file or directory
...

   -r, --reference=FILE
          display the last modification time of FILE
...

Is OSX's date command different from Linux?

Re:Show HN: A programmable tooltip on Mac OS by wjdp on Monday April 20, 2020 @11:44AM (#22924904)
Found it, for GNU it's `date -d @1577733633`
Re:Show HN: A programmable tooltip on Mac OS by _nhynes on Monday April 20, 2020 @11:10AM (#22924486)
macOS has BSD date and Linux ships with GNU.
Re:Show HN: A programmable tooltip on Mac OS by tanin on Monday April 20, 2020 @11:05AM (#22924422)
Yes! I was doing that for a while with a command-line tool. I couldn't make up my mind which way was faster. They were both required some sort of motor skill (e.g. switch to terminal, paste, enter) to perform the flows quickly.