Daylight-Calendar-ICS icon indicating copy to clipboard operation
Daylight-Calendar-ICS copied to clipboard

what to do with GMT offset during DST?

Open jpuck opened this issue 3 years ago • 1 comments

Without diving into the code, I'm curious do the times adjust for Daylight Saving Time? I'm wondering what to put for the GMT offset, or even why it's required given the lat/lng

jpuck avatar Nov 09 '20 03:11 jpuck

Yes, this does account for DST. It uses the PHP functions date_sunrise() and date_sunset() (documentation) which ask for GMT offset in addition to lat/lng.

That parameter should use the offset in hours from GMT, so for NYC the value would be -5 (so don't include the DST into the offset integer). I believe PHP handles the "observation" of DST within the above function, but don't quote me on that part– however it handles it, I do know that it works for my timezone.

chrisblakley avatar Nov 09 '20 03:11 chrisblakley