strtime

GNU Date

DirectiveMeaning
%%a literal %
%alocale’s abbreviated weekday name (e.g., Sun)
%Alocale’s full weekday name (e.g., Sunday)
%blocale’s abbreviated month name (e.g., Jan)
%Blocale’s full month name (e.g., January)
%clocale’s date and time (e.g., Thu Mar 3 23:05:25 2005)
%Ccentury; like %Y, except omit last two digits (e.g., 20)
%dday of month (e.g., 01)
%Ddate; same as %m/%d/%y
%eday of month, space padded; same as %_d
%Ffull date; like %+4Y-%m-%d
%glast two digits of year of ISO week number (see %G)
%Gyear of ISO week number (see %V); normally useful only with %V
%hsame as %b
%Hhour (00..23)
%Ihour (01..12)
%jday of year (001..366)
%khour, space padded ( 0..23); same as %_H
%lhour, space padded ( 1..12); same as %_I
%mmonth (01..12)
%Mminute (00..59)
%na newline
%Nnanoseconds (000000000..999999999)
%plocale’s equivalent of either AM or PM; blank if not known
%Plike %p, but lower case
%qquarter of year (1..4)
%rlocale’s 12-hour clock time (e.g., 11:11:04 PM)
%R24-hour hour and minute; same as %H:%M
%sseconds since 1970-01-01 00:00:00 UTC
%Ssecond (00..60)
%ta tab
%Ttime; same as %H:%M:%S
%uday of week (1..7); 1 is Monday
%Uweek number of year, with Sunday as first day of week (00..53)
%VISO week number, with Monday as first day of week (01..53)
%wday of week (0..6); 0 is Sunday
%Wweek number of year, with Monday as first day of week (00..53)
%xlocale’s date representation (e.g., 12/31/99)
%Xlocale’s time representation (e.g., 23:13:48)
%ylast two digits of year (00..99)
%Yyear
%z+hhmm numeric time zone (e.g., -0400)
%:z+hh:mm numeric time zone (e.g., -04:00)
%::z+hh:mm:ss numeric time zone (e.g., -04:00:00)
%:::znumeric time zone with : to necessary precision (e.g., -04, +05:30)
%Zalphabetic time zone abbreviation (e.g., EDT)

By default, date pads numeric fields with zeroes. The following optional flags may follow %:

DirectiveMeaning
-(hyphen) do not pad the field
_(underscore) pad with spaces
0(zero) pad with zeros
+pad with zeros, and put ‘+’ before future years with >4 digits
^use upper case if possible
#use opposite case if possible

Reference: GNU Date Man Page

Python

DirectiveMeaning
%aWeekday as locale’s abbreviated name.
%AWeekday as locale’s full name.
%wWeekday as a decimal number, where 0 is Sunday and 6 is Saturday.
%dDay of the month as a zero-padded decimal number.
%bMonth as locale’s abbreviated name.
%BMonth as locale’s full name.
%mMonth as a zero-padded decimal number.
%yYear without century as a zero-padded decimal number.
%YYear with century as a decimal number.
%HHour (24-hour clock) as a zero-padded decimal number.
%IHour (12-hour clock) as a zero-padded decimal number.
%pLocale’s equivalent of either AM or PM.
%MMinute as a zero-padded decimal number.
%SSecond as a zero-padded decimal number.
%fMicrosecond as a decimal number, zero-padded on the left.
%zUTC offset in the form +HHMM or -HHMM (empty string if the the object is naive).
%ZTime zone name (empty string if the object is naive).
%jDay of the year as a zero-padded decimal number.
%UWeek number of the year (Sunday as the first day of the week) as a zero padded decimal number. All days in a new year preceding the first Sunday are considered to be in week 0.
%WWeek number of the year (Monday as the first day of the week) as a decimal number. All days in a new year preceding the first Monday are considered to be in week 0.
%cLocale’s appropriate date and time representation.
%xLocale’s appropriate date representation.
%XLocale’s appropriate time representation.
%%A literal ‘%’ character.

Reference: Python Datetime Docs

GoLang

Specify your desired format using Mon Jan 2 15:04:05 -0700 MST 2006.

DirectiveMeaning
MonWeekday as locale’s abbreviated name.
MondayWeekday as locale’s full name.
JanMonth as locale’s abbreviated name.
JanuaryMonth as locale’s full name.
1Month as decimal number.
01Month as a zero-padded decimal number.
2Day of the month as decimal number.
02Day of the month as a zero-padded decimal number.
15Hour (24-hour clock) as a zero-padded decimal number.
3Hour (12-hour clock) as a decimal number.
03Hour (12-hour clock) as a zero-padded decimal number.
pmLocale’s equivalent of either am or pm.
PMLocale’s equivalent of either AM or PM.
4 04Minute as a zero-padded decimal number.
5 05Second as a zero-padded decimal number.
06Year without century as a zero-padded decimal number.
2006Year with century as a decimal number.
-07UTC offset in the form +HH or -HH (empty string if the the object is naive).
-0700UTC offset in the form +HHMM or -HHMM (empty string if the the object is naive).
MSTTime zone name (empty string if the object is naive).

Reference: Time.Format GoDoc