1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

date and times question

Discussion in 'PHP' started by kalius, Oct 16, 2005.

  1. #1
    Just a noob question here.:D

    I need to get the difference in hours between the current time of the server and the last modified time of a file.

    getlastmod () will get the last modified as a time stamp
    and time() will get the current time. I need to get the diference in hours between these 2:confused: , any help appreciated.
     
    kalius, Oct 16, 2005 IP
  2. durango

    durango Guest

    Messages:
    83
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #2
    $seconds = time() - getlastmod();
    $minutes = $seconds/60;
    $hours = $minutes/60;
    Code (markup):
     
    durango, Oct 16, 2005 IP
  3. kalius

    kalius Peon

    Messages:
    599
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks I knew it was a really stupid question..
     
    kalius, Oct 17, 2005 IP