Skip to main content
gamedev.net
🔒 Locked

Date Time format

Started by emilbbb Sep 6, 2003 at 3:20 PM 2 replies 200+ views
Original Post
emilbbb
emilbbb
I know that the hex number 3F5A14C1h if the same as the date time format 06/09/2003 17:09:21. Does anyone know how to calculate a date time format from a hex number?
JohnBolton
JohnBolton
There are many many many different functions that convert a binary time to a readable format. The one to use depends on the language, the OS, and other things.

I''m sure that you will find an answer if you look in documentation related to the method that you used to find the current time.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
emilbbb
emilbbb
I found the answer.
The hex number 3F5A14C1h is a time_t(long) variable and it holds the seconds that have elapsed from 01/01/1970 00:00:00.
So I just added 1062868161 seconds to 01/01/1970 00:00:00 and then it worked.
C-Junkie
C-Junkie
FYI, this is known as unix time format.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.