Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 63995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:43:13+00:00 2026-05-10T18:43:13+00:00

The event returns a standardized timestamp in the format of Sat Oct 25 21:55:29

  • 0

The event returns a standardized timestamp in the format of ‘Sat Oct 25 21:55:29 +0000 2008’ How can I compare this with the current time in PHP so that it gives me the result in a form like ‘It has been 15 minutes!’ or ‘It has been three days!’ Also, how can I get the current time?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-10T18:43:14+00:00Added an answer on May 10, 2026 at 6:43 pm

    First convert that string to a UNIX timestamp using strtotime():

    $event_time = strtotime('Sat Oct 25 21:55:29 +0000 2008'); 

    Then to get the current UNIX timestamp use time():

    $current_time = time(); 

    Then get the number of seconds between those timestamps:

    $difference = $current_time - $event_time; 

    And finally use division to convert the number of seconds into number of days or hours or whatever:

    $hours_difference = $difference / 60 / 60; $days_difference = $difference / 60 / 60 / 24; 

    For more information on calculating relative time, see How do I calculate relative time?.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 62k
  • Answers 62k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Check out Function#Apply(). It lets you pass the parameters as… May 11, 2026 at 10:08 am
  • added an answer You can check your classpath. It should include atleast The… May 11, 2026 at 10:08 am
  • added an answer There is no reason you can't use both. Doing through… May 11, 2026 at 10:08 am

Related Questions

The event returns a standardized timestamp in the format of Sat Oct 25 21:55:29
Windows Form I'm using the DragOver event on a layoutpanel and the DragEventArgs returns
How to cancel a keypress event in a textbox after pressing the return key.
Does anybody knows why this snippet returns false even if the passed string is
Is there any possibility that GetPropInfo returns nil even if the given class is
The monthRegex regular expression always returns true, even if dateInput is something like December
In Ruby, I'm trying to do the following. def self.stats(since) return Events.find(:all, :select =>
How can I capture the event in Excel when a user clicks on a
How does the event creation and handling work in Java Swing?
The grid display all information correctly, In the event dataGridView1cellFormatting I change the backcolor

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.