C Conundrums?

Talk about your favorite PC games, Steam and building awesome custom rigs!

Moderator: Moderators

Post Reply
totokan
Senior Member
Posts: 1785
Joined: Wed May 18, 2005 12:29 pm
Location: 127.0.0.1
Contact:

C Conundrums?

Post by totokan »

I'm attempting to code a program in C to give the amount of time until a specific date. Unfortunately for me, time in C is represented as the amount of seconds elapsed since January 1st, 1970, for some reason I can't comprehend beyond 'unix used it'. Is there a simple way to convert a date into that format?
Shhh! I'm not officially back yet.
gannon
Moderator
Posts: 6974
Joined: Sun Apr 04, 2004 4:48 pm
Location: Near that one big lake
Contact:

Post by gannon »

http://www.cplusplus.com/reference/clibrary/ctime/ might give an answer, gives at least the opposite :P
totokan
Senior Member
Posts: 1785
Joined: Wed May 18, 2005 12:29 pm
Location: 127.0.0.1
Contact:

Post by totokan »

That's a very useful resource, I've been using it for a long time now. difftime seems to be useful only if you have the seconds already, and I think I am just overlooking some simple mathmatical method, not a function or anything...
Shhh! I'm not officially back yet.
Post Reply