# Unixtime to localtime

**URL:** https://discourse.nodered.org/t/unixtime-to-localtime/52364
**Category:** General
**Created:** [18 October 2021 12:10 UTC](https://discourse.nodered.org/t/unixtime-to-localtime/52364 "2021-10-18T12:10:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Becker](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@Becker](https://discourse.nodered.org/u/Becker)
#### Post date: [18 October 2021 12:10 UTC](https://discourse.nodered.org/t/unixtime-to-localtime/52364/1 "2021-10-18T12:10:39Z")

</div>

Hi,  
I can´t get the right time for example:  
1634641200 should be: 19.10.2021, 13:00:00 [UTC+2]

I tried date/time formater gives me: "1970-01-19T22:04:01.200Z"  
and

```auto
$moment(payload).locale("de").format('dddd, [der] D. MMMM YYYY [um] HH:mm') 

```

gives me 1970 too

what did I do wrong ?

edit: i think "1634641200" is to short, there must be more "0". 🤔

---

<div class="post-metadata">

### Author: ![ghayne](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ghayne/32/39_2.png) [@ghayne](https://discourse.nodered.org/u/ghayne)
#### Post date: [18 October 2021 12:19 UTC](https://discourse.nodered.org/t/unixtime-to-localtime/52364/2 "2021-10-18T12:19:26Z")

</div>

Where did you get the numbers from?

---

<div class="post-metadata">

### Author: ![Becker](https://avatars.discourse-cdn.com/v4/letter/b/c77e96/32.png) [@Becker](https://discourse.nodered.org/u/Becker)
#### Post date: [18 October 2021 12:19 UTC](https://discourse.nodered.org/t/unixtime-to-localtime/52364/3 "2021-10-18T12:19:39Z")

</div>

openweathermap, I just have to multiply with 1000

for example:

```auto
msg2.payload = msg.payload.daily[1].dt *1000;

```

thanky anyway

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [1 November 2021 12:20 UTC](https://discourse.nodered.org/t/unixtime-to-localtime/52364/4 "2021-11-01T12:20:28Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
