Увеличение DateTime по часу или мин

Это номер раздела руководства.

От человек мужчина :

The table below shows the section numbers of the manual followed by the types of pages they contain.

1   Executable programs or shell commands
2   System calls (functions provided by the kernel)
3   Library calls (functions within program libraries)
4   Special files (usually found in /dev)
5   File formats and conventions eg /etc/passwd
6   Games
7   Miscellaneous (including macro packages and conventions), e.g. man(7), groff(7)
8   System administration commands (usually only for root)
9   Kernel routines [Non standard]
1
04.10.2018, 19:45
2 ответа

Как указал Stéphane Chazelas, проблема вызвана знаком + перед часом, потому что он сигнализирует о часовом поясе, а не о часе.

Итак, вместо:

$ date -d "1999-05-20 00:00:00 +1 hour"

Используйте это:

$ date -d "1999-05-20 00:00:00 1 hour"
0
28.01.2020, 00:26

Кажется, работает на моем Ubuntu 18.04 при добавлении дельты в начале:

date -d "-10min 1999-05-20 23:00:00"
Do 20. Mai 22:50:00 CEST 1999
0
28.01.2020, 00:26

Теги

Похожие вопросы