Linux Time conversion methods:
(1) date-d "Wednesday, December 17, 2008 17:27:22 CST" + "%s"
This command converts the 17:27:22 CST to a timestamp on Wednesday, December 17, 2008
Results: 1229515680
(2) Convert time stamp 1123495443 to recognizable date
Date-d ' 1970-01-01 UTC 1123495443 seconds '
Result: Monday, August 08, 2005 18:04:03 CST
(3) date-d "Mon June 13:36:28 CST 2006" + "%F%h:%m:%s"
The command will be converted at the time "Mon June 13:36:28 CST 2006" to convert to the format you want to output + "%F%h:%m:%s"
Results: 2006-07-17 13:36:28
FreeBSD Time Conversion Method:
(1) Date-j-F "%a%b%d%T%Z%Y" "Wed Dec 17:55:36 CST 2008" "+%s"
This command converts the time Wed Dec 17:55:36 CST 2008 to a timestamp
Results: 1229507736
(2) Convert timestamp 1229507736 to current time
Date-r 1229507736
Results: Wed Dec 17:55:36 CST 2008
(3) Date-j-F "%a%b%d%T%Z%Y" "Mon June-June 13:16:11 JST 2006" "+%f%h:%m:%s"
The command converts the converted time "' Date '" to the format you want "+%s"
Results: 2006-07-17 13:16:11
Add:
Under Perl:
Convert timestamp to time perl-e "Print scalar localtime ' 1209391893"
PHP under:
Generate Timestamp Method: Mktime (hours, minutes, seconds, months, days, years)
Do you understand the Linux time conversion method here?