Linux time conversion method:
(1)date -d"Wednesday, December 17, 2008 17:27:22 CST" +"%s"
This command converts 17:27:22 CST on Wednesday, December 17, 2008 into a timestamp
Result: 1229515680
(2) Converts the timestamp 1123495443 into an identifiable year Months, minutes and seconds
date -d '1970-01-01 UTC 1123495443 seconds'
Result: Monday, August 08, 2005 18:04:03 CST
(3)date -d"Mon Jul 17 13:36:28 CST 2006" +"%F %H:%M:%S"
The time the command will be converted “Mon Jul 17 13:36:28 CST 2006” Convert to the format you want to output +"%F %H:%M:%S"
Result:2006-07-17 13:36:28< Br>
Freebsd time conversion method:
(1)date -j -f "%a %b %d %T %Z %Y" "Wed Dec 17 17:55:36 CST 2008" "+%s"
This command converts the time Wed Dec 17 17:55:36 CST 2008 to a timestamp
Result: 1229507736
(2) Convert timestamp 1229507736 to current time
date -r 1229507736
Result: Wed Dec 17 17:55:36 CST 2008
(3)date - j -f "%a %b %d %T %Z %Y" "Mon Jul 17 13:16:11 JST 2006" "+%F %H:%M:%S"
The command converts the converted time "`date`" to the format you want"+%s"
Result:2006-07-17 13:16:11
Supplement:
Perl:
Convert timestamp to time perl -e "print scalar localtime '1209391893'"
PHP
下下:
Generate timestamp method: mktime (hour, minute, second, month, day, year)
Is there a way to understand Linux time conversion?
(1) Ifconfig command The first type uses the ifconfig command to configure the ip
1. Get root privileges without logging in. If you dont set GRUB password, then we can use the easie
You can try it, but dont do bad things. Fortunately, I need a password to modify m
Just as Hong Kong is still engaged in tug-of-war on the issue of electronic textbooks for bookseller
Talk about how to learn Linux system
Linux setuid and setgid explain
Ordinary users under Linux can not directly use crontab problem
Linux uninstall apache method summary
Linux shell flow control (condition if, loop [for, while], select [case] statement instance
Linux restart command reboot using tutorial
CentOS Linux builds .NET environment
Novice Academy: Six questions you should know about installing Linux
Free burning software Know? Nero 8 FAQs at a glance
How to make Windows XP compatible with 16-bit DOS programs
DOS real mode "soft shutdown" skill
How to easily erase traces of Win7 search records
MSN super practical skills big release 2
Remove the login interface of Wind 2000 system
XP browser can not open the web page and prompt the website restore error how to solve?
Can only enter safe mode, press F8 to select normal boot in the boot menu and enter safe mode
Win7 LAN connection prompt 0x80070035 error solution Raiders
Windows 8 system how to open and disable the administrator account method