Free Online iCal Sunrise and Sunset Calendar Generator

Local Information - Portland Oregon - Pacific Standard (US/Pacific)
This script was last updated on 16 Jan, 2024
Today   - 21 Nov 2024
Sunrise - 07:18
Sunset  - 16:34

Use the form below to generate an iCal-formatted calendar for your location.
Use the 'offset' if you need to schedule an event (or notification) before or after the actual sunrise or sunset time - or whatever.

NOTE: Before you import the ICS, please check it. It's a lot of hassle to remove a year of individual events. Or you can make a new, separate calendar that you can delete in one operation.

You cannot subscribe to the calendar. You must come back here annualy or generate multiple years of calendars at a time now.

* = Required for accurate results, location defaults to Portland International Airport, Oregon, USA (45.58753, -122.58886)


 

latitude (decimal i.e. 45.5555)
*


longitude (decimal - don't forget the minus sign if in the west)
*


start date (MM/DD/YYYY) defaults to today



end date (MM/DD/YYYY) defaults to one year from today (maximum 365 days)



sunrise offset in minutes (use "+15" or "-15" for example)



sunset offset in minutes (use "+15" or "-15)" for example



*  important - your timezone



check one or both of the boxes below










Enter Description Here :

NOTES

I wrote this in late 2009, updated it for different versions of PHP, then in 2022 to add 12 hour time, accessibility fixes, location services, and updated the sunrise / sunset calculations. In 2024 added an option to create an all-day event.
I do NOT do anything with your location. It's only passed back to this form where it's used to calculate the events.

DAYLIGHT SAVING TIME:
PHP appears to have DST built in but you must select the correct time zone. America/Phoenix, won't give you DST because Arizona doesn't do DST.

Problems or questions - contact me or buy me a coffee

Source code