'Year 10000 out of range' error makes entries uneditable
The problem
I created a bunch of entries for chores that are set to never expire. They added entries beyond the year 10,000 which triggers the below out of range error
What version of Home Assistant Core has the issue?
core-2024-5-2
What was the last working version of Home Assistant Core?
No response
What type of installation are you running?
Home Assistant OS
Integration causing the issue
calendar
Link to integration documentation on our website
https://www.home-assistant.io/integrations/calendar/
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
No response
Additional information
I also can't delete the calendar and all the entries to recreate it via the helper menu (apparently deleting calendars is not a thing via the GUI?). If the event that triggers this bug is less often than one week, the error occurs but you can delete the event at least.
Also fun, once you get this error on a calendar, you get the error even recreating the event with a finite amount of repetitions.
I have tried restarting HAOS (which is running as a VM on a home server), but I am a little lost on even troubleshooting this further.
Hey there @home-assistant/core, mind taking a look at this issue as it has been labeled with an integration (calendar) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of calendar can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign calendarRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
calendar documentation calendar source (message by IssueLinks)
Same problem here. I enabled debug logging for the local calendar before I tried to delete a recurring event but it didn't show much useful information:
2024-05-19 12:13:23.123 DEBUG (MainThread) [ical.store] Matched exact recurrence_id: dtstamp=datetime.datetime(2024, 5, 19, 10, 5, 15, 409385) uid='809a190a-e2e4-11ee-86c1-dca63272040c' dtstart=datetime.datetime(2024, 5, 19, 12, 7) dtend=datetime.datetime(2024, 5, 19, 13, 0) duration=None summary='Zone 1' attendees=[] categories=[] classification=None comment=[] contacts=[] created=datetime.datetime(2024, 3, 17, 13, 53, 43) description='' geo=None last_modified=datetime.datetime(2024, 5, 19, 10, 5, 15, 409385) location=None organizer=None priority=None recurrence_id='20240519T120000' related_to=[] related=[] resources=[] rrule=None rdate=[] exdate=[] request_status=None sequence=3 status=None transparency=None url=None extras=[] alarm=[]
2024-05-19 12:13:23.124 DEBUG (MainThread) [ical.store] Expanding item 809a190a-e2e4-11ee-86c1-dca63272040c 2024-03-16 12:00:00 to look for match of 20240519T120000
2024-05-19 12:13:23.124 DEBUG (MainThread) [ical.types.date_time] DateTimeEncoder returned 2024-05-19 12:00:00
2024-05-19 12:13:26.786 ERROR (MainThread) [homeassistant.components.calendar] Error handling Calendar Event call: year 10000 is out of range
I'm also encountering this, and its preventing me from making any changes to any calendar event now. The error shows up on all events, though it seems I can still delete some. Others are stuck and I can't remove them. I would really rather avoid deleting the whole calendar (if it will even let me do that).
Also getting this. Is there some workaround?
Same here, any updates? It doesn't allow me to delete event as well.
Same issue here
same problem. had everything working great with a scheduled automation and now I can't edit or delete events.
I got this just now when changing only a single event out of a recurring series (set never to expire). Now all meetings (even non recurring ones) on all local calendars appear to have the same message on them, though refreshing the page clears it. I can't even delete the offending event :/
Update: As a workaround I was able to edit the offending event instance directly in the ICS file, however the problem still persists for the entire recurring event.
For those of you interested, if you update only a single event then it will be stored as a separate entry in the ics file. The original recurring event will have an EXDATE field added for the specific event, and the new one will be saved separately, eg:
BEGIN:VEVENT
DTSTAMP:20241114T062346
UID:d7c886a6-84a8-11ef-a85c-a8a159009e1e
DTSTART:20241115T120000
DTEND:20241115T170000
SUMMARY:your one time event
CREATED:20241007T123658
DESCRIPTION:
LAST-MODIFIED:20241114T062346
RECURRENCE-ID:20241116T120000
SEQUENCE:1
END:VEVENT
Issue still persists on 2024.12
I think there's a pattern: each time I faced this issue it was coming from a recurring event, on which I manually changed the date for one of them. Once manually changed, I encounter this issue, and I can't edit the event a 2nd time anymore (neither delete it)
Grade A toxic garbage on that last comment. Either code the fix and commit it as a pull request, or say something actually helpful without the heaping condescension and scorn. If you aren't going to do either of those, don't comment on this issue and instead go touch some grass or see a therapist about your anger. None of us who are having this issue care that you are this super awesome ZOMG world altering high paid dev - we care whether this issue is going to get fixed or not.
Having the same issue. @mkolesnik are you able to describe how to get to the ics files so I can fix my calendar, at least until the bug is squashed?
Thanks
@dovy6 for me they're all under the .storage directory where the main HA config is.
I'm running HA in a container on unraid, so the full path is
/mnt/user/appdata/Home-Assistant-Container/.storage/*.ics
Thanks, finally fixed my garbage collection calendar
On Wed, Dec 11, 2024, 7:25 AM Mike Kolesnik @.***> wrote:
@dovy6 https://github.com/dovy6 for me they're all under the .storage directory where the main HA config is. I'm running HA in a container on unraid, so the full path is
/mnt/user/appdata/Home-Assistant-Container/.storage/*.ics
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/117202#issuecomment-2535851958, or unsubscribe https://github.com/notifications/unsubscribe-auth/ASH62CCNB4J5SFUX5BKUEC32FAVNFAVCNFSM6AAAAABHQ7XLOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKMZVHA2TCOJVHA . You are receiving this because you were mentioned.Message ID: @.***>
is there any fix out yet? having same issue.
Same issue on my end too. Wondering whether the local calendar has still any support given usually there's at least a moderator reply in such issues? Looking at the code, it doesn't look like it's trivial for me to dive into troubleshooting, but happy to get insights on how I could debug/test/fix on my end and then contribute a PR. Thanks!
Any news on it? I came across the same problem and now the calendar is unusable!
Any news about this bug?
I have the same problem, I'm using to schedule the cleaning robot and I create and event for test and now I can't fix my test because the event is not editable.
I've created weekly repetable events and fortunatly I just updated only one day and not all days.
Core: 2025.3.1 Supervisor: 2025.03.2 Operating System: 14.2 Frontend: 20250306.0
Same for me Core : 2025.5.1 Supervisor : 2025.04.1 Operating : System 15.2 Interface : utilisateur 20250509.0
Hey there @allenporter, mind taking a look at this issue as it has been labeled with an integration (local_calendar) you are listed as a code owner for? Thanks!
Code owner commands
Code owners of local_calendar can trigger bot actions by commenting:
@home-assistant closeCloses the issue.@home-assistant rename Awesome new titleRenames the issue.@home-assistant reopenReopen the issue.@home-assistant unassign local_calendarRemoves the current integration label and assignees on the issue, add the integration domain after the command.@home-assistant add-label needs-more-informationAdd a label (needs-more-information, problem in dependency, problem in custom component) to the issue.@home-assistant remove-label needs-more-informationRemove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.
(message by CodeOwnersMention)
local_calendar documentation local_calendar source (message by IssueLinks)
Hi folks, this was tagged as "calendar", but it's really "local_calendar" i think based on some of the comments? As a result it didn't get routed to the correct code owner.
This is not only local calendar. I experienced this problem using a CalDAV integration (from a Nextcloud server).
Ah, ok. Can you give me the steps to reproduce this issue? I am unable to get this to happen.
Perhaps you can tell me anything interesting such as:
- your timezone
- literally the exact steps (with local calendar)
Diagnostics for a calendar platform would be helpful (local calendar includes additional information about timezones).
In my case it was related to local calendar. And I'm still waiting for the fix, it's impossibile to use It.
Il dom 1 giu 2025, 03:47 Allen Porter @.***> ha scritto:
allenporter left a comment (home-assistant/core#117202) https://github.com/home-assistant/core/issues/117202#issuecomment-2926263456
Ah, ok. Can you give me the steps to reproduce this issue? I am unable to get this to happen.
Perhaps you can tell me anything interesting such as:
- your timezone
- literally the exact steps (with local calendar)
Diagnostics for a calendar platform would be helpful (local calendar includes additional information about timezones).
— Reply to this email directly, view it on GitHub https://github.com/home-assistant/core/issues/117202#issuecomment-2926263456, or unsubscribe https://github.com/notifications/unsubscribe-auth/AHTELHKNT7CGON5UMN6MYRD3BJLUDAVCNFSM6AAAAABHQ7XLOSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDSMRWGI3DGNBVGY . You are receiving this because you commented.Message ID: @.***>
I used the local calendar integration when I first stumbled on this. I am in AZ time (mst, no daylights savings).
Exact steps I used:
- Create a recurring event on a calendar set to never expire
- Once it populates that event beyond the year 10,000 voila! Out of range error with anything on that calendar.
What steps should I take to get more detailed diagnostics?
I think there must be something obvious we're missing in step 1 since I tried it and can't reproduce this. Can you be even more specific about step 1? This is what i mean by "literally the exact steps (with local calendar)". What has been described before is not reproducible for me. (The outcome you see is pretty clear form the screenshots above)
See https://www.home-assistant.io/docs/configuration/troubleshooting/#download-diagnostics
What i mean is, be more specific about ever button clicked and each field that is set.
Thank you @allenporter for digging into this. I have migrated my HA server from running the X86-64 image as a VM on TrueNAS Scale to the Home Assistant OS running as a VM on Proxmox, but the original calendars are still there. This is that diagnostic information on the exact calendar I first created this issue:
config_entry-local_calendar-fc05189448ab625d4014930567772891.json
Here's as close as I can do it for recreating the event:
- Created a test calendar specifically for reproducing this. Diagnostic configs for this calendar:
config_entry-local_calendar-01JWP5GCBR0Z31R2K5N893540S.json
- Created an entry on that calendar - here's the whole entry
- From there, I gave it 5 minutes to fully populate out - when I attempted to modify it, I was able to modify it at this point.
- I gave it another 15 minutes just in case the HA server hadn't fully populated the entry out past year 10,000 - I'm able to delete/modify the event without any issues.
- Just as a precaution, I went ahead and cleared out the event and then recreated it again.
Verdict: First try, not able to recreate. Note: I did start to try to navigate to the year 10,000 to see if it had populated out that far, and made it to the year 2530 by mashing the space bar and enter key before sighing, saying screw it, and deciding that it's better to just give it time to poulate out. I would LOVE a date search function in the Calendar integration but that's outside of the scope of this issue.
I then realized that I should recreate this as an annually recurring event to speed up population. I did all of the above execpt set the recurrence to yearly, then fed my cat his hand fed squeezable treat for his lunch, worked on beating Rulers of the Outer Worlds in FF7 Rebirth for the umpteenth time, and generally, stepped away from Home Assistant for 45 minutes to really give this time to cook. Modifying the events after that time had zero errors or issues. I also tried modifying the calendar events while using the Nabu Casa cloud access (as I originally created these on my tablet while on the road to the Redwoods, rather than on my local network) and using the same device I'd used to first get that error, and still no dice!
I went through and checked all my other local calendars for any infinitely repeating events - I found several and was able to modify them, no errors or issues.
Final verdict: Unable to recreate this bug that I originally submitted.
Thanks for the detail. Just to clarify how it works, there is no "population" that happens. There is a single event that is expanded on the fly as you navigate through the calendar.
The original event is this single entry:
BEGIN:VEVENT
DTSTAMP:20240510T170932
UID:***
DTSTART:20240601T090000
DTEND:20240601T091000
SUMMARY:***
CREATED:20240510T170932
DESCRIPTION:***
LAST-MODIFIED:20240510T170932
RECURRENCE-ID:***
RRULE:FREQ=WEEKLY;BYDAY=SA
SEQUENCE:***
END:VEVENT
The entry itself is totally normally. There are 4 events in total, nothing about year 10k.
There may be some javascript in the frontend that is parsing something wrong.
When the error happens (or used to happen) -- can we get more specific? e.g. is it shown right away? Then nothing happens when pressing edit? or does it show up when pressing edit? Is the error also logged on the home assistant core logs?
It looks like from the message above happen on the edit call. I also see the error mentioned in the core logs above, so that answers my previous question. That implies that the frontend may be passing in an invalid date or the date gets converted wrong somewhere in the integration.
It could be helpful if we can capture the websocket request being sent to core to see what paramaters are sent and if any of the years are malformed.
I too have this issue. I think I figured it out: I created a new Local Calendar from an ICS file (option 2 in "Add calendar" dialog). These entries all seem to have EXDATE entries, since I've deleted exception events as they occured. I haven't looked into the code yet, but something must go wrong here - along the lines of date calculation.
Using the HA calendar, I can create and edit recurring events just fine. However, instead of altering the original VEVENT with an EXDATE, it simply modifies the preceeding event, setting the recurrence to a finite value. Then a new event is created, with an infinite recurrence.
Example 1 (imported entry with EXDATE):
BEGIN:VCALENDAR
CALSCALE:GREGORIAN
METHOD:PUBLISH
PRODID:-//homeassistant.io//local_calendar 1.0//EN
VERSION:2.0
BEGIN:VEVENT
DTSTAMP:20210805T163353Z
UID:[email protected]
DTSTART;TZID=Europe/Amsterdam:20210904T110000
DTEND;TZID=Europe/Amsterdam:20210904T120000
SUMMARY:My Event
RRULE:FREQ=WEEKLY
EXDATE;TZID=Europe/Amsterdam:20211225T110000
EXDATE;TZID=Europe/Amsterdam:20220101T110000
EXDATE;TZID=Europe/Amsterdam:20220416T110000
EXDATE;TZID=Europe/Amsterdam:20220813T110000
EXDATE;TZID=Europe/Amsterdam:20220820T110000
EXDATE;TZID=Europe/Amsterdam:20220827T110000
EXDATE;TZID=Europe/Amsterdam:20221231T110000
EXDATE;TZID=Europe/Amsterdam:20230401T110000
EXDATE;TZID=Europe/Amsterdam:20230805T110000
EXDATE;TZID=Europe/Amsterdam:20230812T110000
EXDATE;TZID=Europe/Amsterdam:20230819T110000
EXDATE;TZID=Europe/Amsterdam:20231118T110000
EXDATE;TZID=Europe/Amsterdam:20231230T110000
EXDATE;TZID=Europe/Amsterdam:20240224T110000
EXDATE;TZID=Europe/Amsterdam:20240302T110000
EXDATE;TZID=Europe/Amsterdam:20240727T110000
EXDATE;TZID=Europe/Amsterdam:20240803T110000
EXDATE;TZID=Europe/Amsterdam:20240810T110000
EXDATE;TZID=Europe/Amsterdam:20211225T110000
EXDATE;TZID=Europe/Amsterdam:20220101T110000
EXDATE;TZID=Europe/Amsterdam:20220416T110000
EXDATE;TZID=Europe/Amsterdam:20220813T110000
SEQUENCE:0
STATUS:CONFIRMED
BEGIN:VALARM
ACTION:DISPLAY
TRIGGER:-PT1H30M
DESCRIPTION:Manege
END:VALARM
END:VEVENT
<more lookalike entries>
Perhaps there's also some logic error due to the timezone/calendar type (calscale)? The display values are ok, though.
Example 2 (HA logic):
BEGIN:VCALENDAR
PRODID:-//homeassistant.io//local_calendar 1.0//EN
VERSION:2.0
BEGIN:VEVENT
DTSTAMP:20250612T115105Z
UID:68346a28-4783-11f0-a1fb-e0d55ec02ce2
DTSTART:20250611T120000
DTEND:20250611T130000
SUMMARY:Test recurring event
CREATED:20250612T115038Z
DESCRIPTION:descr 1\;
LAST-MODIFIED:20250612T115105Z
RRULE:FREQ=WEEKLY;UNTIL=20250617T120000;BYDAY=WE
SEQUENCE:1
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20250612T115500Z
UID:e9d62a58-4783-11f0-a1fb-e0d55ec02ce2
DTSTART:20250702T130000
DTEND:20250702T140000
SUMMARY:Test 2
CREATED:20250612T115500Z
DESCRIPTION:#tag1
LAST-MODIFIED:20250612T115500Z
RECURRENCE-ID:20250702T130000
RRULE:FREQ=WEEKLY;BYDAY=WE
EXDATE:20250625T130000
SEQUENCE:1
END:VEVENT
BEGIN:VEVENT
DTSTAMP:20250612T115500Z
UID:e9d62a58-4783-11f0-a1fb-e0d55ec02ce2
DTSTART:20250618T130000
DTEND:20250618T140000
SUMMARY:Test 2
CREATED:20250612T115353Z
DESCRIPTION:
LAST-MODIFIED:20250612T115500Z
RRULE:FREQ=WEEKLY;UNTIL=20250701T130000;BYDAY=WE
EXDATE:20250625T130000
SEQUENCE:0
END:VEVENT
TL;DR: Events are altered differently than before(?). Deleting recurring events should produce a new EXDATE, altering them, should utilize the "new" method from example 2.