如何将AD/LDAP时间戳值转换为本地时间值 [英] How to convert AD/LDAP timestamp value to local time value

查看:1015
本文介绍了如何将AD/LDAP时间戳值转换为本地时间值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我从广告客户那里获得帐户的过期日期.
但不是本地时间格式.

自1601年1月1日(UTC)格式以来,其间隔为100纳秒.

如何使用c ++或c将其转换为本地时间格式. br/> {#从SQL 0开始的天数} = {#从ANSI 0开始的天数}-{#从ANSI 0到SQL 0的天数}


我使用我解决的结构时间函数


Hi,

i get the account expire date from the AD.
but its not in the local time format.

Its in 100-nanosecond intervals since January 1, 1601 (UTC) format.

how to convert that into local time format using c++ or c.

解决方案

{# days since ANSI 0} = {AD timestamp} / {# 100ns/day}
{# days since SQL 0} = {# days since ANSI 0} - {# days from ANSI 0 to SQL 0}


I use the struct time function i solved


这篇关于如何将AD/LDAP时间戳值转换为本地时间值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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