Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to turn a unix timestamp into regular UTC time like days hours and seconds

ive been searching a lot, and cant find anything
Posted
Comments
Richard MacCutchan 15-Jul-13 12:23pm    
AFAIR the Unix epoch started on 1 January 1970, so you just need to adjust it from that base.
[no name] 15-Jul-13 20:11pm    
FYI - The term UTC time has nothing to do with how it is formatted eg hh::mm::ss for display. It is the time standard itself.
http://en.wikipedia.org/wiki/Coordinated_Universal_Time

1 solution

A Unix time is stored as C standard run time library type time_t or _time64_t. There are various functions to convert times between the different formats. See Time Management[^] in the MSDN and the CP article Date and Time in C++[^].

[EDIT:]
Another good article is Time Format Conversion Made Easy[^].
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900