Thread: Unix Timestamp Creation

  1. #1
    Registered User
    Join Date
    Apr 2006
    Posts
    7

    Unix Timestamp Creation

    Hello,

    I am pulling my hair out over this one and google has been of no help.

    I'm looking to create a unix timestamp from a given date/time in C. I have looked into using strptime however this doesn't appear to do as I hoped.

    Does anyone have a solution to this?

    Phil

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    Are you in Unix? Have you typed "man 3 time"?

  3. #3
    Registered User
    Join Date
    Oct 2008
    Location
    TX
    Posts
    2,059
    Quote Originally Posted by lavinpj1 View Post
    Hello,

    I am pulling my hair out over this one and google has been of no help.

    I'm looking to create a unix timestamp from a given date/time in C. I have looked into using strptime however this doesn't appear to do as I hoped.

    Does anyone have a solution to this?

    Phil
    Can you post how the input ie date/time in C looks like.

  4. #4
    and the hat of sweating
    Join Date
    Aug 2007
    Location
    Toronto, ON
    Posts
    3,545
    Date & Time functions here.
    "I am probably the laziest programmer on the planet, a fact with which anyone who has ever seen my code will agree." - esbo, 11/15/2008

    "the internet is a scary place to be thats why i dont use it much." - billet, 03/17/2010

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to program in unix
    By Cpro in forum Linux Programming
    Replies: 21
    Last Post: 02-12-2008, 10:54 AM
  2. Setting up a Unix box
    By @nthony in forum Tech Board
    Replies: 6
    Last Post: 07-22-2007, 10:22 PM
  3. UNIX Timestamp ? - Removing the Day
    By chl12 in forum C Programming
    Replies: 1
    Last Post: 06-12-2007, 05:14 AM
  4. newbie needs help with code
    By compudude86 in forum C Programming
    Replies: 6
    Last Post: 07-23-2006, 08:54 PM
  5. convert integer unix timestamp to time
    By rotis23 in forum C Programming
    Replies: 2
    Last Post: 11-18-2002, 09:20 AM