0
有人可以解釋這一點嗎?它僅在時間爲1或2時才返回「無效日期」。在凌晨3點之後,它確實轉換爲unix時間戳。Linux日期:無效日期
[[email protected] ~]$ date --version
date (GNU coreutils) 8.4
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David MacKenzie.
[[email protected] ~]$ date --date="Sun Mar 10 01:59:00 PDT 2013" +%s
date: invalid date `Sun Mar 10 01:59:00 PDT 2013'
[[email protected] ~]$ date --date="Sun Mar 10 02:59:00 PDT 2013" +%s
date: invalid date `Sun Mar 10 02:59:00 PDT 2013'
[[email protected] ~]$ date --date="Sun Mar 10 03:59:00 PDT 2013" +%s
1362913140
[[email protected] ~]$ date --date="Sun Mar 10 04:59:00 PDT 2013" +%s
1362916740
謝謝!
@rici我的部分錯字。應該是標準... – 2013-10-19 02:36:29