SYSTEMTIME FileTimeToLocalFileTime 使用
来源:互联网 发布:mac卸载java 8 编辑:程序博客网 时间:2024/06/05 17:40
有时候SYSTEMTIME获取时间值是在协调世界时(UTC)格式,比如说北京时间为上午10:00,可能通过我们的代码获取到的时候为凌晨1-2点,这个时间就是UCT的格式,所以需要转换为本地时间,转换为本地时间需要用到FileTimeToLocalFileTime,看下参数,
BOOL WINAPI FileTimeToLocalFileTime( __in const FILETIME* lpFileTime, __out LPFILETIME lpLocalFileTime);
- lpFileTime
A pointer to a FILETIME structure containing the UTC-based file time to be converted into a local file
//一个指向包含要转换成一个本地文件时间基于UTC的文件时间FILETIME结构。
lpLocalFileTime
A pointer to a FILETIME structure to receive the converted local file time. This parameter cannot be the same as the lpFileTime parameter.
//一个指针,指向一个FILETIME结构,以接收转换本地文件的时间。这个参数可以是不一样的lpFileTime参数。
具体使用如下: SYSTEMTIME st; FILETIME localft; FILETIME lpFileTime; /* ...... 获取SYSTEMTIME /* SystemTimeToFileTime(&st,&localft); //第一步 将SYSTEMTIME 转换 FILETIME FileTimeToLocalFileTime(&localft,&lpFileTime); //第二步 将FILETIME转换为本地时间 FileTimeToSystemTime(&lpFileTime,&st); //第三步 将FILETIME转换为SYSTEMTIME
0 0
- SYSTEMTIME FileTimeToLocalFileTime 使用
- SYSTEMTIME
- SYSTEMTIME
- WINDOWS API ---GetFileTime() FileTimeToLocalFileTime() FileTimeToSystimeTime()
- Systemtime相关
- SYSTEMTIME相关
- Windows中如何计算时间间隔(2)使用SYSTEMTIME和FILETIME
- FILETIME 、SYSTEMTIME的转换
- CTime和SYSTEMTIME转化
- DATE SYSTEMTIME 转换
- CTime,COleDateTime,SYSTEMTIME
- FILETIME SYSTEMTIME tm time_t
- __time64_t 转 systemtime
- tm ,time_t,SYSTEMTIME转换
- 两个SYSTEMTIME比较
- php time to systemtime
- FILETIME SYSTEMTIME tm time_t
- COleDateTime SYSTEMTIME CTime
- 表单上传文件提交实现ajax方式
- 用homebrew安装mongodb
- win7无线网络共享
- UIViewController在调removeFromParentViewController时遇到的问题
- C# DateTime 日期加1天 减一天 加一月 减一月
- SYSTEMTIME FileTimeToLocalFileTime 使用
- EPM7000/3000的几个全局输入脚GCLK1,OE2(GCLK2),OE1,GLCRn都是干什么的?怎么在编程中使用?
- ibatis #和$的区别
- Java中数组是如何存储的?
- 一些 android 图文混排的资料
- jQuery Mobile样式加载问题
- Android运行时异常“Binary XML file line # : Error inflating class”
- Android开发-drawable文件夹(ldpi,mdpi,hdpi,xhdpi)
- 100 High-Quality Java Developers’ Blogs