在MFC中将本地时间转换为特定时区 [英] Convert local time to specific time zone in MFC
问题描述
我是MFC开发和学习/了解其工作原理的新手。但我必须完成一项任务。
我有一项需要创建日期时间的任务, GetLocalSystem时间并在保存该日期时间之前将其转换为特定的TimeZone。
例如,我的应用程序在印度运行,所以我需要在(IST)的函数调用中获得系统时间需要在发送到服务器以进行保存之前将其转换为(EST)。
我花了很长时间在谷歌上,但我找不到太多可以在MFC中使用。
任何示例代码都可以帮助我理解如何在我的MFC项目中使用它。
谢谢,
Jiten Patoliya Windows C#开发人员
你好,
有看看这个:
https://stackoverflow.com/questions/38190593/time-conversion - 时间区间
此致,Guido 一>
Hi,
I am new to MFC development and learning/understanding how that works. But I have to complete a task.
I have a task which requires to create a datetime, GetLocalSystem time and convert it to specific TimeZone before saving that datetime.
For example, my application is running in india so i need to get system time at function call which is in (IST) and need to convert that in (EST) before sending to sever for save.
I spend long time on google but there's not much i could find that works in MFC.
Any sample code would help a lot to understand how can I use that in my MFC project.
Thanks,
Jiten Patoliya Windows C# developer
Hello,
have a look at this: https://stackoverflow.com/questions/38190593/time-conversion-between-timezones
这篇关于在MFC中将本地时间转换为特定时区的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!