我们如何让日期工具解析时区字符串?
但是。
这是本地信息:
$>date -d "2018-02-21T02:22:33.221" "+%Y-%m-%dT%H:%M:%S.%3N %Z"
2018-02-20T14:22:33.221 EST
但是。
$>date -d "2018-02-21T02:22:33.221 EST" "+%Y-%m-%dT%H:%M:%S.%3N %Z"
date: invalid date `2018-02-21T02:22:33.221 EST'
这是本地信息:
$>uname -r
2.6.32-696.13.2.el6.x86_64
$>date
Tue Jan 16 09:58:52 EST 2018
$>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.
date --version
是date (GNU coreutils) 8.25
;你的呢? - Murphy