How do I set the date using milliseconds and or seconds from epoch?

date -s 127846398127?

2 Answers 2

date -s @127846398127

should do it... (But just with seconds, so I'd expect a 10-digit value.)


You need a dot . separator between seconds and nanos.

date -s @1611850626.716999059

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.