Using PHP,mysql, i am trying to export/import calendar data from/to Google calendar. The importing (to Google) works fine. I can export data from my mysql table and create an ics file then import it into Google Calendar, using a specific timezone.
The problem is when i am exporting the data... Google changes the timezone for every event. I'll give an example.
When i am importing the data to Google Calender, a typical event looks like this:
BEGIN:VEVENT
UID:20
DTSTAMP:20160328T222128
DTSTART:20160328T033000
DTEND:20160328T043000
LOCATION:
DESCRIPTION:My description here
SUMMARY:Event number 3
END:VEVENT
The StartTime is 033000 and EndTime is 043000. Everything is fine, i see an event starting at 3:30am and ending at 4:30am.
When i am exporting my calendar from Google this event looks like this:
BEGIN:VEVENT
DTSTART:20160328T003000Z
DTEND:20160328T013000Z
DTSTAMP:20160328T194501Z
UID:20
CREATED:20160328T224357Z
DESCRIPTION:My description here
LAST-MODIFIED:20160328T194410Z
LOCATION:
SEQUENCE:0
STATUS:CONFIRMED
SUMMARY:Event number 3
TRANSP:OPAQUE
END:VEVENT
StartTime 003000 EndTime 013000
Both .ics files have X-WR-TIMEZONE:Europe/Athens
Why on earth is Google sending me back Zulu time, instead of what i am seeing in the calendar ? I dont want to handle timezones. This means if a person from the Usa uploads an .ics file to the custom calendar i am making, it will insert wrong times in the database. Is it possible, Google Calendar to export exactly the hours a person sees in his calendar?
If i cant avoid this, what is the easiest way to convert this Z time into the proper time ? (the time that person sees in Google Calendar)
Thanks!