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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:54:41+00:00 2026-05-25T21:54:41+00:00

This is my current code that doesn’t seem to work correctly. echo date(h:i, 1*60*60)

  • 0

This is my current code that doesn’t seem to work correctly.


echo date("h:i", 1*60*60) ; /* 1*60*60 mean 1 hours right */

The result is 03:00 when it should be 01:00.

Where is this going wrong?

i want to do this

1- employee come in time admin select it

2- employee come – leave saved in mysql as timestamp

Now I’m trying to make admin see how many hours user late
mean

user date time default late

user1 11-09-2011 09:10 09:00 10 min

user1 12-09-2011 08:00 09:00 -60 min

  • 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-25T21:54:42+00:00Added an answer on May 25, 2026 at 9:54 pm

    If you output just date("Y-m-d H:i:s",0) you should see that it’s not 1970-01-01 00:00:00 as it should be. It’s because date is affected by your local timezone. For example I’m in GMT +3, and date("Y-m-d H:i:s") gives me 1970-01-01 03:00:00.

    So the answer is you are not in GMT timezone (probably in GMT+2), and date is affected by it.

    UPDATE

    The following code outputs 1970-01-01 00:00:00, so it’s definitely time zones.

    date_default_timezone_set('UTC');
    echo date("Y-m-d H:i:s", 0);
    

    Hovewer, I can’t see any mention about it in PHP’s date manual.

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

Sidebar

Related Questions

I'm running code that sometimes yields this: UInt32 current; int left, right; ... //sometimes
Given the following code (that doesn't work): while True: # Snip: print out current
basically got this bit of code that doesn't work in ie8 & lower. The
This question is related to a previous question of mine That's my current code
This snippet of code always parses the date into the current timezone, and not
I am having a bit of difficulty with this current code I have set
As a beginner in Ocaml, I have this current working code: ... let ch_in
My current code is this $swift = email::connect(); $swift->setSubject('hello') ->setFrom(array('alex@example.com.au' => 'Alex')) ->setTo(array('alex@example.com.au' =>
This is my current scenario: I have checked in my grails app code +
here is my current line of code: $(<li>).text($(this).text()).appendTo(#theList); Which results in <ul id=theList> <li>blah</li>

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.