开发者

how to convert time of the day in UTC time?

开发者 https://www.devze.com 2022-12-29 20:31 出处:网络
i have time of the day in seconds and i have to find the utc time since 1970, is there any api which can directly convert this time to utc time,

i have time of the day in seconds and i have to find the utc time since 1970, is there any api which can directly convert this time to utc time,

i m using ansi c , and working on windows platform platform independent a开发者_运维技巧pi will be preferred

thanx in advance.


You can fill in a tm struct with the time of day you have (you'd have to convert it into seconds/minutes/hours) and the date. Then convert it with mktime() in time.h.

0

精彩评论

暂无评论...
验证码 换一张
取 消