View Single Post
Old 10-18-2023, 12:57 PM   #1
jj1705
Junior Member
jj1705 began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Oct 2023
Device: Kindle4
Kindle4 "Date -d" use?

For the life of me, I can't seem to get the date command to work with either the -d or --date arguments to give me the epoch time for a future date. Do I need a new version of the date binary? I'm guessing the version of the binary on the kindle doesn't support this argument?

This works:
TODAY=$(date +"%Y-%m-%d")
CURRENT_TIME=$(date +%s)

These just return a blank string:
TMP_A=$(date +%s -d "Fri Apr 24 13:14:15 2023")
TMP_B=$(date +%s -d "2023-10-17 06:00")
TMP_C=$(date -d "tomorrow 06:00" +"%s")
TMP_D=$(date -d "Oct 21 1973" +'%s')
TMP_E=$(date +%s -d "Fri Apr 24 13:14:39 CDT 2009")
TMP_F=$(date --date "today 17:00" +%s)
jj1705 is offline   Reply With Quote