Hello.
I have a simple form with time. When i enter my time, lets say 04:15 i get the following:
1970-01-01T03:15:00.000Z
My research here revealed that this is normal and is the unix time. There are ways to format the time.
What i am now trying to do is just simply refill the timefield with my entered time (unixtime). When i do so (see flow) my timefield has this wired appearance: 04:14:00:000.
What do i miss?
Thank you
[
{
"id": "72b8b15bd5b75057",
"type": "ui_form",
"z": "02d1a812d54255d5",
"name": "",
"label": "",
"group": "0c8e5477df738067",
"order": 2,
"width": 0,
"height": 0,
"options": [
{
"label": "time",
"value": "time",
"type": "time",
"required": true,
"rows": null
}
],
"formValue": {
"time": ""
},
"payload": "",
"submit": "submit",
"cancel": "cancel",
"topic": "topic",
"topicType": "msg",
"splitLayout": "",
"className": "",
"x": 530,
"y": 940,
"wires": [
[
"4aee33864945dbc9",
"a59053bdadb650d1"
]
]
},
{
"id": "4aee33864945dbc9",
"type": "debug",
"z": "02d1a812d54255d5",
"name": "debug 49",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 720,
"y": 940,
"wires": []
},
{
"id": "a59053bdadb650d1",
"type": "change",
"z": "02d1a812d54255d5",
"name": "save",
"rules": [
{
"t": "set",
"p": "savetime",
"pt": "flow",
"to": "payload",
"tot": "msg"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 710,
"y": 900,
"wires": [
[]
]
},
{
"id": "d4ac591e76f10ecf",
"type": "function",
"z": "02d1a812d54255d5",
"name": "get_time",
"func": "msg.payload = flow.get(\"savetime\")\nreturn msg;\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 240,
"y": 940,
"wires": [
[
"30dee64a5789c3c6",
"1f6899a23f94e7eb"
]
]
},
{
"id": "30dee64a5789c3c6",
"type": "function",
"z": "02d1a812d54255d5",
"name": "assign_Key_Value",
"func": "msg.payload = { \n\"time\": msg.payload.time, \n} \nreturn msg; \n\n\n",
"outputs": 1,
"noerr": 0,
"initialize": "",
"finalize": "",
"libs": [],
"x": 390,
"y": 880,
"wires": [
[
"72b8b15bd5b75057"
]
]
},
{
"id": "74b307874a68f9fb",
"type": "ui_ui_control",
"z": "02d1a812d54255d5",
"name": "",
"events": "all",
"x": 80,
"y": 940,
"wires": [
[
"d4ac591e76f10ecf"
]
]
},
{
"id": "1f6899a23f94e7eb",
"type": "debug",
"z": "02d1a812d54255d5",
"name": "debug 50",
"active": true,
"tosidebar": true,
"console": false,
"tostatus": false,
"complete": "false",
"statusVal": "",
"statusType": "auto",
"x": 400,
"y": 1020,
"wires": []
},
{
"id": "0c8e5477df738067",
"type": "ui_group",
"name": "Monitoring-Email",
"tab": "7dfaa34bd3fad2fd",
"order": 2,
"disp": true,
"width": "6",
"collapse": false,
"className": ""
},
{
"id": "7dfaa34bd3fad2fd",
"type": "ui_tab",
"name": "SETTINGS",
"icon": "dashboard",
"order": 4,
"disabled": false,
"hidden": false
}
]