Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.
How to get browser to show server time
-
How do I get the browser charts and anything with time to show the server time and not the time local of the users browser?
I set the users timezone to use the server timezone but the times all appear as local times in the charts etc.
-
Yep all the charts and displays in the dashboards v3 module to not honor the users timezone setting, they always display the time in the browsers timezone. To display times as the servers timezone you have to manually configure your displays.
Regrettably there is no option to set the timezone for serial charts in the current release. I have added this for the next release, you can see the change here if you want to manually patch your module. So the below examples will work out of the box except for the serial chart.
<strong>Current server time</strong> <ma-now update-interval="1 SECONDS" output="time"></ma-now> <p ng-bind="time | moment:'tz':user.getTimezone() | moment:'format':'ll LTS Z z'"></p> <strong>Point value time in server timezone</strong> <ma-get-point-value point-xid="DP_698831" point="myPoint"></ma-get-point-value> <p>Point value is {{myPoint.renderedValue}} @ {{myPoint.time | moment:'tz':user.getTimezone() | moment:'format':'ll LTS Z z'}}</p> <strong>Point value time in server timezone</strong> <div layout="row"> <md-input-container flex> <label>Date preset</label> <ma-date-range-picker from="from" to="to" preset="LAST_1_DAYS" update-interval="1 minutes"></ma-date-range-picker> </md-input-container> </div> <ma-point-values point="myPoint" values="myPointValues" from="from" to="to" rollup="AVERAGE" rollup-interval="1 minutes"> </ma-point-values> <ma-serial-chart style="height: 400px; width: 100%" series-1-values="myPointValues" series-1-point="myPoint" time-format="ll LTS Z" timezone="{{user.getTimezone()}}" options="{legend:{}, chartCursor:{}, categoryAxis: {labelRotation:45}}"> </ma-serial-chart> -
hi,
mango automation, i'm very new,kindly advice how to write script. -
@subakar Can you create a new thread and describe more thoroughly what you are trying to achieve.
-
Jared; Should this code also work in v3.0 I tried it in both play areas and only 2.8.8 works? Is there a different format in 3? Thanks.
maMoment is the change
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login