remove millisecond from echo time bash

Solution 1:

You can divide by 1000 and convert to timestamp.

date -d @"$(echo "1633036680022/1000" | bc)"

Solution 2:

Strip milliseconds with bash (output only first 10 digits):

x="1633036680022"
date -d "@${x:0:10}"