gpt4 book ai didi

Linux 日期 : invalid date

转载 作者:太空宇宙 更新时间:2023-11-04 09:02:00 25 4
gpt4 key购买 nike

<分区>

谁能解释一下?仅当时间为 1 点或 2 点时,它才返回“无效日期”。凌晨 3 点后,它会转换为 unix 时间戳。

[user@localhost ~]$ 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.

[user@localhost ~]$ date --date="Sun Mar 10 01:59:00 PDT 2013" +%s
date: invalid date `Sun Mar 10 01:59:00 PDT 2013'

[user@localhost ~]$ date --date="Sun Mar 10 02:59:00 PDT 2013" +%s
date: invalid date `Sun Mar 10 02:59:00 PDT 2013'

[user@localhost ~]$ date --date="Sun Mar 10 03:59:00 PDT 2013" +%s
1362913140

[user@localhost ~]$ date --date="Sun Mar 10 04:59:00 PDT 2013" +%s
1362916740

谢谢!

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com