mood: accomplished | geeky
So you want to convert one date format to another easy just use the date command!
soloflyer@SoloFlyer:$ date -d "10:30pm 22 november 2008"
Sat Nov 22 22:30:00 CST 2008
Want to specify the conversion format?
soloflyer@SoloFlyer:$ date -d "10:30pm 22 november 2008" +"%Y-%m-%d %H:%M:%S"
2008-11-22 22:30:00
Say we want to add 60 seconds to that... it would be best to use unix time which is the number of seconds since 1970-01-01
soloflyer@SoloFlyer:$ date -d "10:30pm 22 november 2008" +"%s"
1227355200
Add 60 to 1227355200 we get 1227355260 so now lets convert that back to real time
soloflyer@SoloFlyer:$ date -d "1227355260"
date: invalid date `1227355260'
Oh whoops, that didnt work, so lets read the man page... Nothing!!
Arrg ok google it is... after what felt like #$@&ing ages I still havent found an answer, but I notice a website that has displayed unix time and put an @ before it... might as well try it...
soloflyer@SoloFlyer:ret:1$ date -d "@1227355260"
Sat Nov 22 22:31:00 CST 2008
Why couldnt that be mentioned somewhere... anywhere... sigh...
Ill probably put in a bug report suggesting a section be added regarding accepted input for the -d option...
Hey who knows I might even write it... :)