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

  • SEARCH
  • Home
  • 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 9021829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:20:59+00:00 2026-06-16T05:20:59+00:00

This is all driving me crazy here. $now = time (); gives me the

  • 0

This is all driving me crazy here.

$now = time (); gives me the timestamp right now.

Question:

does: $today = strtotime(date("Y-m-d")); give me the timestamp of seconds of today? starting from 00:00?

I’ve been trying to answer it myself by substracting $now with the total seconds elapsed since $today, but I’m getting a whole different amount.

EDIT

Im getting for today:

1355961600

and for now:

1356002627 (+ 1 second every second since I’ve posted this)

Since the difference is really small I think that should be it, but when I’m trying to calculate myself I don’t get the same amount. Might be the difference between my localhost time and real time here… You guys think this is it?

  • 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. Editorial Team
    Editorial Team
    2026-06-16T05:21:01+00:00Added an answer on June 16, 2026 at 5:21 am

    (it’s 12:15 now here):

    php > echo time() - strtotime(date("Y-m-d"));
    44116
    php > echo 44116 / 3600;
    12.254444444444
    

    PHP 5.3.10, on Ubuntu 12.04

    time() will give the seconds from the Unix Epoch (Jan 1, 1970 00:00:00 UTC) until “now”. strtotime(date("Y-m-d")) will give the seconds from the Unix Epoch until 00:00:00 this morning. Subtract those and you get the seconds elapsed today.

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

Sidebar

Related Questions

This is driving me crazy already and by now I'm absolutely hopeless :( Here
OK, this is driving me crazy now, I already messed with all my code
This is driving me crazy! I have read at least 5 questions on here
OK, this one is driving me crazy. First of all, everything works fine in
Sorry for the stupid question, but this is driving me crazy... I have test_framework.php
This has been driving me crazy all day. I need to get a font
this has been driving me crazy all day so I figured I'd post it
I've got a lot of code that's driving me really crazy right now. I'm
I'm driving crazy about this, but I'm sure it's only a small thing.. All
This is driving me nuts. I've looked at all the relevant MSDN tutorials but

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.