4 ms·
One day you'll need to read a date written by someone else.
by lazyasciiart 6y ago
One day you'll need to read a date written by someone else.
- lovelyviking 6y agoOr 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_")