t := time.Now()
formatted := fmt.Sprintf("%d-%02d-%02dT%02d:%02d:%02d",
t.Year(), t.Month(), t.Day(),
t.Hour(), t.Minute(), t.Second())
-
https://stackoverflow.com/questions/20234104/how-to-format-current-time-using-a-yyyymmddhhmmss-formatdate +%Y-%m-%d_%H-%M-%S
-
https://links.infomee.fr/?jh3dRwdatetime.date.today().strftime("%Y-%m-%d")
datetime.datetime.now().strftime("%Y-%m-%d %H:%M")
-
https://links.infomee.fr/?Aw6ttQTIL :
What is this date format? 2011-08-12T20:17:46.384
The T is just a literal to separate the date from the time, and the Z means "zero hour offset" also known as "Zulu time" (UTC). If your strings always have a "Z" you can use
-
http://stackoverflow.com/questions/8405087/what-is-this-date-format-2011-08-12t201746-384z$ date "+%F %T"
2016-05-24 16:02:07
-
https://links.infomee.fr/?SP2ltwThe "sixth" field (the rest of the line) specifies the command to be run. The entire command portion of the line, up to a newline or % character, will be executed by /bin/sh or by the shell specified in the SHELL variable of the cronfile. Percent-signs (%) in the command, unless escaped with backslash (), will be changed into newline charac- ters, and all data after the first % will be sent to the command as standard input.
-
http://unix.stackexchange.com/questions/29578/how-can-i-execute-date-inside-of-a-cron-tab-jobun article pour se décider dans quel timezone configurer ses serveurs linux et quelques astuces si on choisit le format UTC
-
http://www.bortzmeyer.org/date-utc.htmlApprenez à utiliser les fonctions de gestion des dates en PHP.
-
http://www.vulgarisation-informatique.com/dates-php.php