将Exif日期转换为其他格式 [英] Convert Exif date to different format

查看:160
本文介绍了将Exif日期转换为其他格式的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我得到一个exif日期值,例如

I am getting an exif date value like

EXIFPhotoDate: 1506173228000 and
UploadDate: 1506485214000

但我知道是

EXIFPhotoDate   23/9/2017, 23:27 and 
UploadDate  9/27/2017, 01:59

前者是通过REST查询的,后者是通过表查询的。

The former is when queried via REST and the latter is when queried via the table.

如何从a获取标准日期/时间像这样的值吗?

How can I get standard date/time from a value like this?

推荐答案

自1970年1月1日起,您在UTC上有几毫秒的时间。如果从最后删除 000 ,将具有 Unix时间戳,即自1970年1月1日起UTC的秒数:

Looks like you have a number of milliseconds since January 01 1970 in UTC. If you remove the 000 from the end, you will have a Unix timestamp, that is, the number of seconds since January 01 1970 in UTC:

unixTimestamp = 1506173228000 / 1000

一旦您的问题没有说明任何编程语言,很难为您提供进一步的帮助。

Once your question doesn't state any programming language, it's hard to give you further help.

这篇关于将Exif日期转换为其他格式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆