|
|
|
@ -253,8 +253,8 @@ $(function () { |
|
|
|
tvQuoter.find('[data-name="zhangdiee"]').css('color',zhangdiee>0?'#53b987':'#eb4d5c'); |
|
|
|
} |
|
|
|
timestampToTime(timestamp) { |
|
|
|
const date = new Date(timestamp); |
|
|
|
const getHours = date.getHours() > 12 ? date.getHours() - 12 : date.getHours() + 12 |
|
|
|
const dates = new Date(timestamp); |
|
|
|
const date = this.adjustToEasternTime(dates); |
|
|
|
|
|
|
|
const yyyy = `${date.getFullYear()}`; |
|
|
|
const yy = `${date.getFullYear()}`.substr(2); |
|
|
|
@ -273,6 +273,24 @@ $(function () { |
|
|
|
} |
|
|
|
return dateStr |
|
|
|
} |
|
|
|
|
|
|
|
adjustToEasternTime(date) { |
|
|
|
// 将给定日期转换为时间戳
|
|
|
|
const timestamp = date.getTime(); |
|
|
|
|
|
|
|
// 获取美国东部时区偏移值(以分钟为单位)
|
|
|
|
const easternOffset = -240; // 美国东部时区偏移值为 -240 分钟
|
|
|
|
|
|
|
|
// 调整时间为美国东部时间
|
|
|
|
const adjustedTime = timestamp - (date.getTimezoneOffset() + easternOffset) * 60 * 1000; |
|
|
|
|
|
|
|
// 创建新的日期对象,并使用调整后的时间戳
|
|
|
|
const adjustedDate = new Date(adjustedTime); |
|
|
|
|
|
|
|
// 返回调整后的日期对象
|
|
|
|
return adjustedDate; |
|
|
|
} |
|
|
|
|
|
|
|
getResolutionTime() { |
|
|
|
const resolution = this.TView.chart().resolution(); |
|
|
|
switch (resolution) { |
|
|
|
|