• Recent
    • Tags
    • Popular
    • Register
    • Login

    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.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    How to get browser to show server time

    Dashboard Designer & Custom AngularJS Pages
    4
    5
    2.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      v8dave
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • Jared WiltshireJ
        Jared Wiltshire
        last edited by

        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>
        

        Developer at Radix IoT

        1 Reply Last reply Reply Quote 0
        • S
          subakar
          last edited by

          hi,
          mango automation, i'm very new,kindly advice how to write script.

          1 Reply Last reply Reply Quote 0
          • Jared WiltshireJ
            Jared Wiltshire
            last edited by

            @subakar Can you create a new thread and describe more thoroughly what you are trying to achieve.

            Developer at Radix IoT

            1 Reply Last reply Reply Quote 0
            • P
              Phillip Weeks
              last edited by Phillip Weeks

              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

              1 Reply Last reply Reply Quote 0
              • First post
                Last post