I know that there have been similar questions asked, but they seemed to have to do with the way datetime deals (or doesn\'t deal) with timezones.
The setup is a litt
%-*
-- to skip padding -- is a GNU libc extension. It's not part of POSIX strftime, and thus not guaranteed to be portable to systems where your time-formatting calls aren't eventually backed by GNU's strftime
C library function.
The Python datetime module documentation explicitly specifies the format strings it supports, and this extension is not given. Thus, while this is supported in GNU date and GNU strftime()
, it isn't available in Python datetime
.