Managing timezone in php with ics date/time format
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-09T15:10:32Z
Indexed on
2010/04/09
15:13 UTC
Read the original article
Hit count: 606
Ok, I'm using an ICS parser utility to parse google calendar ICS files. It works great, except google is feeding me the times of the events at UCT.. so I need to subtract 5 hours now, and 6 hours when daylight savings happens.
To get the start time I'm using:
$timestart = date("g:iA",strtotime(substr($event['DTSTART'], 9, -3)));
//$event['DTSTART'] feeds me back the date in ICS format: 20100406T200000Z
So any suggestions how to handle timezone and daylight savings time?
Thanks in advance
© Stack Overflow or respective owner