# Clock from Phone

**URL:** https://discourse.nodered.org/t/clock-from-phone/31812
**Category:** Dashboard
**Created:** [21 August 2020 07:25 UTC](https://discourse.nodered.org/t/clock-from-phone/31812 "2020-08-21T07:25:30Z")
**Posts on this page:** 1
**Showing post:** 12

<div class="post-metadata">

### Author: ![UnborN](https://avatars.discourse-cdn.com/v4/letter/u/4491bb/32.png) [@UnborN](https://discourse.nodered.org/u/UnborN)
#### Post date: [21 August 2020 09:37 UTC](https://discourse.nodered.org/t/clock-from-phone/31812/12 "2020-08-21T09:37:48Z")

</div>

Hi Bruno,

I was working on a ui\_template example along Colin's suggestions.  
That is getting the time from the user browser sending to node-red and after that you have to process it with the exec node you mentioned

Example flow ...

```auto
[{"id":"ce3be529.f3d278","type":"ui_template","z":"f54b08eb.e98bb","group":"c205e26f.6865a","name":"","order":0,"width":"0","height":"0","format":" <html>\n <head>\n <title>Time</title>\n <script type=\"text/javascript\"> \n \n var date = new Date().toString();\n document.getElementById('ct').innerHTML = date;\n \n this.scope.sendDate = function() {\n console.log(\"in function\")\n // return {payload: new Date().toString()}; // .valueOf() \n return {payload: new Date().valueOf()}; // \n }\n \n</script>\n \n </head>\n\n <body>\n <div id='ct' style=\"margin-bottom: 40px;\"></div>\n <br>\n <br>\n<md-button ng-click=\"send(sendDate())\">\n Send time to Node-red\n</md-button>\n\n </body>\n </html>","storeOutMessages":true,"fwdInMessages":true,"resendOnRefresh":true,"templateScope":"local","x":720,"y":480,"wires":[["9352a614.0fc998"]]},{"id":"9352a614.0fc998","type":"debug","z":"f54b08eb.e98bb","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":900,"y":480,"wires":[]},{"id":"c205e26f.6865a","type":"ui_group","z":"","name":"Default","tab":"20af7edd.a91fca","order":1,"disp":true,"width":"12","collapse":false},{"id":"20af7edd.a91fca","type":"ui_tab","z":"","name":"Home","icon":"dashboard","disabled":false,"hidden":false}]

```

---

_[View the full topic](https://discourse.nodered.org/t/clock-from-phone/31812)._
