1. timestamp ๊ฐ์ผ๋ก ์ํ๋ ๋ ์ง ํํ๋ก ๋ณํํ๊ธฐ
$ date -d '1970-01-01 1676360315 sec'
2023. 02. 14. (ํ) 07:38:35 KST
$ date -d '1970-01-01 1676360315 sec' +'%Y-%m-%d %H:%M:%S'
2023-02-14 07:38:35
* ๊ฒฐ๊ณผ๋ ์์คํ Timezone์ ๋ง์ถฐ์ ํ์๋จ
2. ๋ ์ง ํ์์ผ๋ก timestamp ๊ฐ ๊ตฌํ๊ธฐ (1๋ฒ๊ณผ ๋ฐ๋)
$ date -d '2022-02-14' +%s
1644764400
728x90