将数据转换为数值类型格式
有人可以帮助确定此日期和时间的格式(时间戳)。我目前正在尝试具有链接的Webhook具有我需要获得时间戳的安全要求。但是,时间戳的格式对我来说是新的。请参阅下面的格式:
格式化的时间戳转换为字符串应该看起来像:
1496734173
我不知道如何将日期和时间转换为类似的东西。我不知道该代码是什么或实际说的时间是什么。
Can somebody help identify the format of this date and time (timestamp). THe webhook I am currently trying to have a link to has a security requirements where I need to get the timestamp. However, the format of the timestamp is new to me. See below the format:
The formatted timestamp converted to string should look like this:
1496734173
I have no idea how do I convert a date and time into something like this. I don't know what this code is or what time does it actually tells.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来像是一个非常标准的Unix时期时间戳。假设我们使用UTC(GMT)时区,日期是2017年6月6日,星期二7:29:33 AM。
UNIX时间是自1970年1月1日以来过去的秒数。时间戳意味着1496734173秒以来已经过去了,大约是47岁半,即2017年6月6日。
您可以转换
dateTime < /code>以以下方式对将UNIX时间戳的对象:
或者,一行:
That looks like a pretty standard UNIX epoch timestamp. Assuming we're using the UTC (GMT) timezone, the date is Tuesday, June 6, 2017 7:29:33 AM.
UNIX time is the amount of seconds that have passed since Jan 1, 1970. The timestamp means 1496734173 seconds have passed since then, which is about 47 and a half years, i.e. June 6, 2017.
You can convert a
DateTime
object to a UNIX timestamp in the following way:Or, in one line:
我认为这代表 unix timestamp。
在这里,您可以尝试在此处转换您的时间戳:检查您的时间
I think that this represents the UNIX timestamp.
Here you can try and convert your timestamp here: check your time