====== Команда date ====== * [[Локализация системы]] ===== Установка времени ===== ==== Linux ==== * [[https://www.garron.me/en/linux/set-time-date-timezone-ntp-linux-shell-gnome-command-line.html|Set Time, Date Timezone in Linux from Command Line]] date +%T -s "11:14:00" timedatectl set-time "2018-10-06 10:35:00" ===== Вывод времени в нужном формате ===== ==== Linux/FreeBSD ==== $ date $ date -u $ date "+%Y-%m-%d_%H:%M:%S" ==== FreeBSD ==== $ date -v-1d "+%Y.%m.%d" ==== Linux ==== $ date --date "1 day ago" +%Y-%m-%d $ date --date "1 hour ago" "+%Y-%m-%d %H"