# toDate() function different behaviour

**URL:** <https://forum.inductiveautomation.com/t/todate-function-different-behaviour/6694>\
**Category:** Ignition\
**Created:** [June 12, 2013, 7:45am UTC](https://forum.inductiveautomation.com/t/todate-function-different-behaviour/6694 "2013-06-12T07:45:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![gljuk](https://avatars.discourse-cdn.com/v4/letter/g/90ced4/32.png) [@gljuk](https://forum.inductiveautomation.com/u/gljuk)\
**Post date:** [June 12, 2013, 7:45am UTC](https://forum.inductiveautomation.com/t/todate-function-different-behaviour/6694/1 "2013-06-12T07:45:57Z")

</div>

We have used toDate() function to get human readable date from epoch. It was working as we expected till we updated our Ignition installation from 7.5.5 to 7.5.8 (b1410). Now it returns different results depending on PC the client is launched on.

Old behaviour: result like “12.06.2013 10:40:37”  
New behaviour: result like “Jun 12, 2013 10:40:37 AM”

What does it depend on? Local timezone? It seems, that it is not, since current timezone has 24H clock setting, not AM/PM. On some PCs it is still working the old way. The old way suits our needs better.

Any ideas?  
Thank you!

---

<div class="post-metadata">

**Author:** ![dymytr](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dymytr](https://forum.inductiveautomation.com/u/dymytr)\
**Post date:** [June 14, 2013, 9:08am UTC](https://forum.inductiveautomation.com/t/todate-function-different-behaviour/6694/2 "2013-06-14T09:08:10Z")

</div>

Try manuly format like:

```auto
dateFormat(toDate(now()),"dd.MM.yyyy HH:mm:ss")
```

---

<div class="post-metadata">

**Author:** ![gljuk](https://avatars.discourse-cdn.com/v4/letter/g/90ced4/32.png) [@gljuk](https://forum.inductiveautomation.com/u/gljuk)\
**Post date:** [June 21, 2013, 6:28am UTC](https://forum.inductiveautomation.com/t/todate-function-different-behaviour/6694/3 "2013-06-21T06:28:14Z")

</div>

It worked! Thank you!
