# Strange error: "object has no attribute 'addDays'"

**URL:** <https://forum.inductiveautomation.com/t/strange-error-object-has-no-attribute-adddays/114230>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [February 27, 2026, 3:00pm UTC](https://forum.inductiveautomation.com/t/strange-error-object-has-no-attribute-adddays/114230 "2026-02-27T15:00:04Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 27, 2026, 3:49pm UTC](https://forum.inductiveautomation.com/t/strange-error-object-has-no-attribute-adddays/114230/6 "2026-02-27T15:49:08Z")

</div>

Does the machine and part data actually change within 30 seconds assuming all params are the same? If so then fair enough way to handle it, but if not I’d do it on an event.

Do you have your global scripting project set? [Expression and runScript problem - #9 by dkhayes117](https://forum.inductiveautomation.com/t/expression-and-runscript-problem/98666/9)

Though I suppose it shouldn’t matter for `system.date` since you are getting that far. Hm idk. Somewhere it’s losing context.

You could try putting a `import system` at the top of your `getAllActiveShifts` function would resolve it but it’s icky to be importing system packages but you may just have to because it’s being called async on the gateway scope. Here’s an IA employee doing exactly that [Changing Perspective Project from Session - #2 by cmallonee](https://forum.inductiveautomation.com/t/changing-perspective-project-from-session/54879/2)

---

_[View the full topic](https://forum.inductiveautomation.com/t/strange-error-object-has-no-attribute-adddays/114230)._
