时间戳 timestamp
判断输入如果是时间戳, 则返回时间解析格式. 如果是时间解析格式, 则返回时间戳. 如果输入为空, 返回当前时间戳
Determine if the input is a timestamp, then return the time parsing format. If it is a time parsing format, return the timestamp. If the input is empty, return the current timestamp.
The unix time stamp is a way to track time as a running total of seconds. This count starts at the Unix Epoch on January 1st, 1970 at UTC. Therefore, the unix time stamp is merely the number of seconds between a particular date and the Unix Epoch. It should also be pointed out (thanks to the comments from visitors to this site) that this point in time technically does not change no matter where you are located on the globe. This is very useful to computer systems for tracking and sorting dated information in dynamic and distributed applications both online and client side.
Human Readable Time | Seconds |
---|---|
1 Hour | 3600 Seconds |
1 Day | 86400 Seconds |
1 Week | 604800 Seconds |
1 Month (30.44 days) | 2629743 Seconds |
1 Year (365.24 days) | 31556926 Seconds |
On this date the Unix Time Stamp will cease to work due to a 32-bit overflow. Before this moment millions of applications will need to either adopt a new convention for time stamps or be migrated to 64-bit systems which will buy the time stamp a "bit" more time.