# Timezone Offset of the dashboard user

**URL:** <https://discourse.nodered.org/t/timezone-offset-of-the-dashboard-user/63929>\
**Category:** General\
**Tags:** node-red-dashboard, database\
**Created:** [14 June 2022 16:01 UTC](https://discourse.nodered.org/t/timezone-offset-of-the-dashboard-user/63929 "2022-06-14T16:01:23Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [14 June 2022 16:36 UTC](https://discourse.nodered.org/t/timezone-offset-of-the-dashboard-user/63929/2 "2022-06-14T16:36:22Z")

</div>

You can use `new Date()` in the ui-template node to get the browser time. You can also use `getTimezoneOffset()` to get time zone.

example when you land on dashboard the template should return iso timestamp and offset in mins

```auto
[{"id":"1f94fb5c.5fe375","type":"ui_ui_control","z":"e67b04df66bd0437","name":"","events":"all","x":190,"y":660,"wires":[["12852117.09e36f"]]},{"id":"12852117.09e36f","type":"function","z":"e67b04df66bd0437","name":"","func":"msg.template = `<script>\nvar btime = new Date();\nthis.scope.send({btime: btime, offset: btime.getTimezoneOffset()});\n</script>`\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":230,"y":700,"wires":[["9e7f00ae.6ac08"]]},{"id":"9e7f00ae.6ac08","type":"ui_template","z":"e67b04df66bd0437","group":"2d4fe667.28f8ba","name":"","order":5,"width":0,"height":0,"format":"","storeOutMessages":true,"fwdInMessages":false,"resendOnRefresh":false,"templateScope":"local","className":"","x":490,"y":640,"wires":[["2ca4bfc8.35ce5"]]},{"id":"2ca4bfc8.35ce5","type":"debug","z":"e67b04df66bd0437","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":640,"y":620,"wires":[]},{"id":"2d4fe667.28f8ba","type":"ui_group","name":"demo","tab":"1caa8458.b17814","order":1,"disp":true,"width":"12","collapse":false},{"id":"1caa8458.b17814","type":"ui_tab","name":"Demo","icon":"dashboard","order":1,"disabled":false,"hidden":false}]

```

---

_[View the full topic](https://discourse.nodered.org/t/timezone-offset-of-the-dashboard-user/63929)._
