POSIX Time

Discussion in 'C++' started by Dan J, Oct 19, 2004.

  1. Dan J

    Dan J Guest

    Does anybody have some source code that converts the number of seconds since
    janurary 1st 1970 into the current time in hours, minutes & seconds format?
    I have had a look on google but could not find anything.

    thanks

    DJ
     
    Dan J, Oct 19, 2004
    #1
    1. Advertising

  2. Dan J

    JKop Guest

    Dan J posted:

    > Does anybody have some source code that converts the number of seconds
    > since janurary 1st 1970 into the current time in hours, minutes &
    > seconds format? I have had a look on google but could not find
    > anything.
    >
    > thanks
    >
    > DJ


    Get a C++ reference. Here's one I like:

    http://www.roguewave.com/support/docs/SourcePro/stdlibref/


    Look at the header <ctime>. This will tell you about all the in-built time
    functionality in C++.


    From there, you'll have to write your own code that will express time as the
    magnitude of the period of time elapsed since Janurary 1st 1970. Ofcourse,
    there may be some code out there already that does this... hint: Google.


    -JKop
     
    JKop, Oct 19, 2004
    #2
    1. Advertising

  3. See boost library.

    The date-time library (http://www.boost.org/libs/date_time/doc/index.html)
    provides a lot of good stuff.

    Catalin

    "Dan J" <> wrote in message
    news:4174dcdd$...
    > Does anybody have some source code that converts the number of seconds
    > since
    > janurary 1st 1970 into the current time in hours, minutes & seconds
    > format?
    > I have had a look on google but could not find anything.
    >
    > thanks
    >
    > DJ
    >
    >
     
    Catalin Pitis, Oct 19, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. RN
    Replies:
    0
    Views:
    2,582
  2. steffen staehle
    Replies:
    0
    Views:
    499
    steffen staehle
    Sep 7, 2004
  3. steffen staehle
    Replies:
    0
    Views:
    555
    steffen staehle
    Sep 7, 2004
  4. Dima
    Replies:
    0
    Views:
    2,249
  5. flamesrock
    Replies:
    8
    Views:
    502
    Hendrik van Rooyen
    Nov 24, 2006
Loading...

Share This Page