dsznndq4912405 2019-04-09 17:19
浏览 20

Laravel / PHP:如何解决ICS文件中的1h差异

I looked through many, if not all, of the questions associated with timezone discrepancies in Laravel but don't think I've seen the answer for this issue.

My application allows people to create events setting the start and end times for an event with a specified timezone that applies to each.

I can confirm that config/app.php has the line:

'timezone' => 'America/New_York'

I have the following (abbreviated) ics file that Laravel is generating:

BEGIN:VCALENDAR
PRODID:-//Event Name
VERSION:2.0
METHOD:REQUEST
BEGIN:VEVENT
SUBJECT:Meeting Name
CLASS:PUBLIC
CREATED:20190311T022400
DTSTART;TZID=America/New_York:20190409T183000
DTEND;TZID=America/New_York:20190409T193000
LOCATION:2833@orgname.org:Place
SUMMARY:Sample Title
DESCRIPTION:We look forward to seeing you. Thank you!
URL;VALUE=URI:http://localhost/events/PMORT2019_04
UID:20190409T183000438@blah.org
SEQUENCE:0
TRANSP:OPAQUE
DTSTAMP:20190409T130438
LAST-MODIFIED:20190409T130437
ORGANIZER;CN=OrgName:MAILTO:events@orgname.org
X-MICROSOFT-CDO-BUSYSTATUS:Confirmed
X-MICROSOFT-CDO-INTENDEDSTATUS:Confirmed
END:VEVENT
END:VCALENDAR

The ICS file shows that 1830 (6:30pm) is the start with 1930 (7:30pm) as the end time. This is what was entered as input and it is what I'd expect to see when opening the ICS file.

However, when I open the resulting ICS file on a windows machine (in the same timezone) Outlook is showing a 7:30pm-8:30pm timeframe which is incorrect.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 maple软件,用solve求反函数出现rootof,怎么办?
    • ¥65 汇编语言除法溢出问题
    • ¥15 Visual Studio问题
    • ¥15 state显示变量是字符串形式,但是仍然红色,无法引用,并显示类型不匹配
    • ¥20 求一个html代码,有偿
    • ¥100 关于使用MATLAB中copularnd函数的问题
    • ¥20 在虚拟机的pycharm上
    • ¥15 jupyterthemes 设置完毕后没有效果
    • ¥15 matlab图像高斯低通滤波
    • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗