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 7086215
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:31:19+00:00 2026-05-28T07:31:19+00:00

OK. So I have been trying to implement a timer. Now a very weird

  • 0

OK. So I have been trying to implement a timer. Now a very weird thing is happening and I can’t understand why ?.

Basically I am trying to find the difference between the last access and the current time. I am storing the time of last access in the database. This value is according to the server time. But when I try the time() function of php it shows me values which are 5-6 hours behind the time that I have in the database.

For example: here is my code :

    $t1= strtotime($played_row->timer); // Time from the database with CURRENT_TIMESTAMP

    $t2= strtotime("now"); // Get the current time

It shows Year: 2012 Month: 01 Day: 21 – 05:28 pm for t2

and Year: 2012 Month: 01 Day: 21 – 10:28 pm for my timestamp values.

Can anyone tell my why is that ?

P.S: I am running the code on my computer itself.

  • 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-05-28T07:31:20+00:00Added an answer on May 28, 2026 at 7:31 am

    Most likely this is a timezone issue: if you are in the Eastern timezone, you are 5 hours away from UTC right now. If one sytem is returning local time and another is returning UTC this is what you will see.

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

Sidebar

Related Questions

For a few weeks now, I have been trying to implement a DFT that
I have been trying to implement Win32's MessageBox using GTK. The app uses SDL/OpenGL,
I've been trying to implement unit testing and currently have some code that does
I have been trying to understand the way ActionScript's events are implemented, but I'm
I have been trying to find a really fast way to parse yyyy-mm-dd [hh:mm:ss]
I have been trying to get around this error for a day now and
I have been trying to explain the difference between switch statements and pattern matching(F#)
I have been trying to create a chat bubble for about a month now...
I've been trying to implement the C2DMReceiver to receive push notification. I have downloaded
I'm trying to implement hough transform for lines in matlab. And I have been

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.