doumu1873 2010-04-16 20:15
浏览 714
已采纳

.ics日历文件 - 解析日期时间 - 时间格式是什么?

I am coding in php, attempting to get the start\end dates and times for events. I am utilizing the following RegEx for parsing out the information:

$pattern='/(?P<StartDate>[0-9]{8})T(?P<StartTime>[0-9]{6})
.+(?P<EndDate>[0-9]{8})T(?P<EndTime>[0-9]{6})/';

The sample event entry is here:

BEGIN:VEVENT
UID:34b09fd7-8e6e-4d56-86b0-445745b89d93
ORGANIZER;CN=*********:mailto:*********
DTSTART;TZID="(GMT-06.00) Central Time (US & Canada)":20100413T130000
DTEND;TZID="(GMT-06.00) Central Time (US & Canada)":20100413T160000
STATUS:CONFIRMED
CLASS:PRIVATE
X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
TRANSP:OPAQUE
X-MICROSOFT-DISALLOW-COUNTER:TRUE
DTSTAMP:20100414T140711Z
SEQUENCE:0
END:VEVENT

20100413T130000 and 20100413T160000 are the start and end points.

The dates are straight forward, however how do I interpret the time part?

This event starts at one and ends at four.

  • 写回答

1条回答 默认 最新

  • douyanxing6054 2010-04-16 20:19
    关注

    They are in HHmmss format where HH is the hours in a 24 hour format. 130000 is 13:00:00, ie. 1 pm (13 - 12 = 1 pm), 0 minutes, 0 seconds.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥60 如何批量获取json的url
  • ¥15 对法兰连接元件所承受的表面载荷等效转化为法兰开孔接触面上的等效表面载荷?
  • ¥15 comsol仿真压阻传感器
  • ¥15 Python线性规划函数optimize.linprog求解为整数
  • ¥15 llama3中文版微调
  • ¥15 pg数据库导入数据序列重复
  • ¥15 三分类机器学习模型可视化分析
  • ¥15 本地测试网站127.0.0.1 已拒绝连接,如何解决?(标签-ubuntu)
  • ¥50 Qt在release捕获异常并跟踪堆栈(有Demo,跑一下环境再回答)
  • ¥30 python,LLM 文本提炼