问答详情
源自:2-4 解析模块的实现

ParseInLocation出了这个问题

t, err := time.ParseInLocation("02/Jan/2006:15:04:05 +0000", ret[4], loc)


cannot parse "[24/Jul/2019:21:48:23 +0000]" as "02" [24/Jul/2019:21:48:23 +0000] 这个是什么问题啊,时间格式也没问题

提问者:慕村1538275 2019-07-24 21:50

个回答

  • 慕村1538275
    2019-07-24 21:54:16

    2019/07/24 21:53:03 ParseInLocation fail: parsing time "[24/Jul/2019:21:53:03 +0000]" as "02/Jan/2006:15:04:05 +0000": cannot parse "[24/Jul/2019:21:53:03 +0000]" as "02" [24/Jul/2019:21:53:03 +0000]

    ret[4]打印出来是这个 [24/Jul/2019:21:53:03 +0000]