Skip to content

Helpful scripts

Created: 2018-06-30 23:23:00 -0700 Modified: 2018-07-02 15:36:41 -0700

Get time in UTC (formatted however you want)

Section titled Get time in UTC (formatted however you want)

This is just a Python script, so I wrapped it in a shell command and put it in my %PATH%:

python -c “from datetime import datetime; print datetime.utcnow().strftime(m/Y - M H:%%M (in 24H) )”

Keep in mind that the above was written for CMD where you have to escape % signs; on Linux, replace them with a single % sign.