3 ms·
Or perhaps one day you'll need to read this one :) If I meet another date format I convert it to this one when possible. For instance I setup this date format
by lovelyviking 6y ago
Or perhaps one day you'll need to read this one :)
If I meet another date format I convert it to this one when possible.
For instance I setup this date format for MacOS in Settings->Language & Region->Advanced->Dates: this way:
Short: y-MM-dd
Medium: y-MM-dd
Long: y-MM-dd_HH-mm-ss
Full: EEEE,y-MM-dd_HH-mm-ss
You just put those strings there and it should work.
In terminal you can do it too:
date "+%Y-%m-%d_%H-%M-%S_"
or
datetime=$(date "+%Y-%m-%d_%H-%M-%S_")