I know about
date -d @<timestamp in seconds>
and
awk '{print strftime("%c", <timestamp in seconds>)}'
but what if I have milliseconds. Is there trivial way to do this without dropping the final three characters of the millisecond-timestamp (not that dropping characters is difficult, but I would think there’d be a one-step way for such a straightforward task)?
Instead of dropping characters, you could divide by 1000:
Or:
Or (MacOS):
Edit: Adjusted for the quotients instead of division.
Edit2: Thx zeekvfu, fixed.