gpt4 book ai didi

date - ical导出的格式化时间

转载 作者:行者123 更新时间:2023-12-02 08:19:33 24 4
gpt4 key购买 nike

我在 jquery 中创建了一个导出到 ical 的日历。但是,我在日期时间方面遇到了一些问题。

ical 导出脚本需要以下格式的日期/时间:19970714T170000Z。

有人知道这是什么以及我应该如何准备我的字符串吗?

谢谢

最佳答案

阅读 RFC ( link )给出:

3.3.5. Date-Time

[...]

date-time = date "T" time

The "DATE-TIME" value type expresses time values in three forms:

FORM #1: DATE WITH LOCAL TIMEFor example, the following represents January 18, 1998, at 11 PM:19980118T230000

FORM #2: DATE WITH UTC TIMECAPITAL LETTER Z suffix character, to the time value.
For example, the following represents January 19, 1998, at 0700 UTC:19980119T070000Z

FORM #3: DATE WITH LOCAL TIME AND TIME ZONE REFERENCETZID=America/New_York:19980119T020000

DTSTART:19970714T133000 ; Local timeDTSTART:19970714T173000Z ; UTC timeDTSTART;TZID=America/New_York:19970714T133000; Local time and time; zone reference

关于date - ical导出的格式化时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10518804/

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