# Time library of type str

**URL:** <https://forum.inductiveautomation.com/t/time-library-of-type-str/114922>\
**Category:** Ignition\
**Tags:** scripting\
**Created:** [April 7, 2026, 3:41pm UTC](https://forum.inductiveautomation.com/t/time-library-of-type-str/114922 "2026-04-07T15:41:48Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [April 7, 2026, 3:41pm UTC](https://forum.inductiveautomation.com/t/time-library-of-type-str/114922/1 "2026-04-07T15:41:48Z")

</div>

In the script console this script return this result. Why the time library is of type str?

```python
import time
print dir(time)
print type(time)

```

[' **add**', ' **class**', ' **cmp**', ' **contains**', ' **delattr**', ' **doc**', ' **ensure\_finalizer**', ' **eq**', ' **format**', ' **ge**', ' **getattribute**', ' **getitem**', ' **getnewargs**', ' **getslice**', ' **gt**', ' **hash**', ' **init**', ' **le**', ' **len**', ' **lt**', ' **mod**', ' **mul**', ' **ne**', ' **new**', ' **reduce**', ' **reduce\_ex**', ' **repr**', ' **rmul**', ' **setattr**', ' **str**', ' **subclasshook**', '\_formatter\_field\_name\_split', '\_formatter\_parser', 'capitalize', 'center', 'count', 'decode', 'encode', 'endswith', 'expandtabs', 'find', 'format', 'index', 'isalnum', 'isalpha', 'isdecimal', 'isdigit', 'islower', 'isnumeric', 'isspace', 'istitle', 'isunicode', 'isupper', 'join', 'ljust', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rjust', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'swapcase', 'title', 'translate', 'upper', 'zfill']  
\<type 'str'\>

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [April 7, 2026, 3:46pm UTC](https://forum.inductiveautomation.com/t/time-library-of-type-str/114922/2 "2026-04-07T15:46:15Z")

</div>

Hmm, this probably means you've redefined `time` somewhere.

---

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [April 7, 2026, 3:58pm UTC](https://forum.inductiveautomation.com/t/time-library-of-type-str/114922/3 "2026-04-07T15:58:39Z")

</div>

Thats the strange part. This is a brand new gateway and I am running this code in the script console. I really don’t know where it would be redefined.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 7, 2026, 9:46pm UTC](https://forum.inductiveautomation.com/t/time-library-of-type-str/114922/4 "2026-04-07T21:46:12Z")

</div>

Press the restart button in the script console editor and see if that helps?

---

<div class="post-metadata">

**Author:** ![kevinmarchand](https://avatars.discourse-cdn.com/v4/letter/k/439d5e/32.png) [@kevinmarchand](https://forum.inductiveautomation.com/u/kevinmarchand)\
**Post date:** [April 8, 2026, 1:00pm UTC](https://forum.inductiveautomation.com/t/time-library-of-type-str/114922/5 "2026-04-08T13:00:47Z")

</div>

Thanks that did the trick.
