The different of date command in Ubuntu and Alpine.steemCreated with Sketch.

in #cn2 years ago

Today I found the date command has different performance when I develop a bash shell.

In Ubuntu OS:

-> % date -d '2022-06-16T23:21:03' +%s
1655421663

The same command in Alpine OS. This will give an error message:

/ # date -d '2022-06-16T23:21:03' +%s
date: invalid date '2022-06-16T23:21:03'

We have to remove the letter T from the time string.

/ # date -d '2022-06-16 23:21:03' +%s
1655421663

Coin Marketplace

STEEM 0.35
TRX 0.12
JST 0.040
BTC 71539.00
ETH 3603.23
USDT 1.00
SBD 4.75