# Inject node - Use local time not UTC

**URL:** https://discourse.nodered.org/t/inject-node-use-local-time-not-utc/11332
**Category:** General
**Created:** [20 May 2019 16:28 UTC](https://discourse.nodered.org/t/inject-node-use-local-time-not-utc/11332 "2019-05-20T16:28:08Z")
**Posts on this page:** 2
**Page:** 2

<div class="post-metadata">

### Author: ![Colin](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/colin/32/17040_2.png) [@Colin](https://discourse.nodered.org/u/Colin)
#### Post date: [8 November 2021 19:29 UTC](https://discourse.nodered.org/t/inject-node-use-local-time-not-utc/11332/22 "2021-11-08T19:29:21Z")

</div>

Ok, sorry. I am not sure that replying to a ten month old post is worth doing.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [9 November 2021 11:18 UTC](https://discourse.nodered.org/t/inject-node-use-local-time-not-utc/11332/23 "2021-11-09T11:18:20Z")

</div>

> [@HeneryH](#):
>
> Hardly any humans live on UTC.

Actually, 10's of millions of people live in UTC for at least 1/2 the year 😀

The point is that once you get into local time, you are at the whims of historic and inconsistent time handling that changes depending on your position on the Earth, the time of day and day of year. Any reasonably complex time/date handling is eventually likely to hit at least one issue. By using UTC as the base and only using local time for user input and output, you avoid all of those pitfalls.

> [@HeneryH](#):
>
> Reply went to the wrong person. Sorry. My comment was to someone who hinted that use of local time was somehow a bad practice.

It mostly is bad practice - for the server - not necessarily always. As always, it is up to the author to work out what is best. I can only pass on my 40+ years of experience of dealing with date/time calculations for enterprise systems.

[Previous page](https://discourse.nodered.org/t/inject-node-use-local-time-not-utc/11332.md?page=1)
