007grafana监控时间戳转换
一、
https://d.jyall.me/dashboard-solo/db/soloview?panelId=1&var-metrics=stats.gauges.zookeeper.monitor.xg_arch_soa_zk_5.synced_followers&from=1539153284120&to=1539295502327
(1)后边的为毫秒的时间戳转换(互转在线工具如下): https://tool.lu/timestamp/

(2)python来实现转换:
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import time def timeStamp(timeNum):
'''
13位时间戳(毫秒级)转成正常格式的时间
:param timeNum:
:return:
'''
timeStamp = float(timeNum/1000)
timeArray = time.localtime(timeStamp)
otherStyleTime = time.strftime("%Y-%m-%d %H:%M:%S", timeArray)
return otherStyleTime def timeToStamp(date):
millis = int(round(time.time() * 1000))
return millis def main():
print timeStamp(1539301262215) #2018-10-12 07:41:02
print timeToStamp("") #1539316977202(十三位now的时间戳) if __name__ == '__main__':
main()
007grafana监控时间戳转换的更多相关文章
- 【C#】时间戳转换
今天有时间戳转换的需求,网上找了半天才找到相关代码,经测试有效,特作此笔记和大家分享! 1.时间戳转为C#格式时间 /// <summary> /// 时间戳转为C#格式时间 /// &l ...
- 1:时间戳转换成年月日函数,2:url截取参数方法,3:弹窗自定义方法 4:点击按钮加入购物车
最近一直在使用vue.js来构建项目,先分享一下一些简单可复用的函数. 1:时间戳转换Date.prototype.format = function(fmt){ //author: yumeiqia ...
- Unix时间戳转换怎样在Excel批量修改?
最近在操作项目的时候碰到一个Unix时间戳转换的问题."date_time":1393031347这个是什么,你知道吗?如果你对Unix时间戳了解的话一眼就看出来.但我们本着科普的 ...
- piap.excel 微软 时间戳转换mssql sql server文件时间戳转换unix 导入mysql
piap.excel 微软 时间戳转换mssql sql server文件时间戳转换unix 导入mysql 需要不个mssql的sql文件导入mysql.他们的时间戳格式不同..ms用的是自定义的时 ...
- mysql 日期 时间戳 转换
/***************************************************************************************** * mysql 日 ...
- Mysql的 时间戳转换 和 c# 的时间戳转换 (以秒来进行转换,非毫秒,主要是mysql不能存毫秒)
Mysql 时间戳函数 => 从时间 转成 时间戳 UNIX_TIMESTAMP() 获取当前服务器时间的时间戳 UNIX_TIMESTAMP('2013-01-01 12:33:19') ...
- unix时间戳转换成标准时间(c#)
//---unix时间戳转换成标准时间(c#)---// /* string timeStamp = "1144821796"; DateTime dtSt ...
- C#将unix时间戳转换成.net的DateTime类型的代码
下面的内容是关于C#将unix时间戳转换成.net的DateTime类型的内容. DateTime epoch = new DateTime(1970,1,1,0,0,0,0, DateTimeKin ...
- 使用python制作时间戳转换工具
使用python制作时间戳转换工具 python 时间戳转日期 日期转时间戳 前言:作为一个程序员一般情况下,json和时间戳是常用的两个工具,我咨询过很多个朋友,他们一般都是通过在线工具对json进 ...
随机推荐
- centos 6.5 ruby环境安装
redis3.0以上支持集群,自带集群管理工具redis-trib.rb:在搭建集群前,安装ruby环境 ruby安装包下载 安装开发工具 1.命令:yum groupinstall "De ...
- Shell编程(八)每隔N分钟执行某脚本
sudo crontab -e
- 基本数据类型转String,String转基本数据类型
基本数据类型 --> 字符串 1.基本数据类型+"" String s = 5 + ""; 2.使用包装类的静态方法toString(参数),参数是要转化 ...
- springboot(十四):springboot整合mybatis
org.springframework.web.HttpMediaTypeNotSupportedException: Content type 'multipart/form-data;bounda ...
- Play XML Entities
链接:https://pentesterlab.com/exercises/play_xxe/course Introduction This course details the exploitat ...
- springboot09-redis
redis安装: 从redis官网下载redis包,解压后: cmd执行命令启动本地redis: D: cd D:\Program Files\redis2.4.5\64bit redis-serve ...
- WordPress分类列表函数:wp_list_categories用法及参数详解举例
http://www.511yj.com/wordpress-wp-categories.html 注意: 1. wp_list_categories() 和 list_cats() 以及 wp_li ...
- 在eclipse中从cvs下载项目,再部署到tomcat常见错误!
1.先调出cvs视图 如果cvs插件还未安装,下载一个: 安装cvs插件:将features和pluguns文件夹里面的内容分别复制到eclipse安装路径下面对应的features和pluguns文 ...
- IE9浏览器打开开发者工具代码正常执行,反之报错
1.can i use console IE9开发者工具打开时支持console对象,否则报错. 2.由于出现错误 80020101 而导致此项操作无法完成 测试代码 <!DOCTYPE ht ...
- 剑指Offer-表示数值的字符串
题目描述 请实现一个函数用来判断字符串是否表示数值(包括整数和小数).例如,字符串"+100","5e2","-123","3.1 ...