我是韩国人。英语说得不好。我想解决当前的问题。来表示时间。但是,这个时间相差 9 小时。我想解决这个问题。请告诉我怎么做。谢谢...
<dom-module id="queue-area-charts">
<template>
<iron-ajax auto id="AjaxPost" url="http://localhost:9090/ybTest2" method="POST" content-type="application/json" handle-as="json" on-response="_onResponse" last-response="{{hresponse}}" debounce-duration="300"></iron-ajax>
<template is="dom-repeat" items="{{hresponse}}" as="hresponse">
{{hresponse.cpu}}
{{hresponse.AGENT_TIME}}
<p></p>
</template>
<vaadin-area-chart id="chart">
<x-axis type="datetime"></x-axis>
<y-axis allow-decimals='false' min='0' max="100">
</y-axis>
<!--"2017-07-27 18:04:46" 15 ==== 1501146197000-->
<tooltip formatter="function () {
return '<b>'+Highcharts.dateFormat('%Y-%m-%d %H:%M:%S', this.x) + '<br/>';}">
</tooltip>
<data-series name="Queue">
<data>
<template is="dom-repeat" items="{{hresponse}}" as="hresponse">
<point>
<x>[[hresponse.AGENT_TIME]]</x>
<y>[[hresponse.cpu]]</y>
</point>
</template>
</data>
</data-series>
</vaadin-area-chart>
</template>
<script>
Polymer({
is: "queue-area-charts",
properties: {
hresponse:{
type: Object,
notify:true,
},
},
_onResponse: function(e, request) {
this.attached();
},
attached: function () {
this.async(function () {
var starttime = "2017-07-27 18:04:46",
endtime = "2017-07-28 00:00:00";
var oData = {"starttime": starttime, "endtime": endtime};
this.$.AjaxPost.body = JSON.stringify(oData);
this.$.AjaxPost.generateRequest();
}, 3000);
}
});
</script>
</dom-module>