Please change the number of seconds to the question of small hours

Source: Internet
Author: User
Ask the number of seconds to change to a small time problem

This is the 06:00:00, according to the truth is 30 hours, and this is correct, is 20 hours


Blue in the admin reply is:

Gmstrftime returns a Greenwich mean GMT.
The first one is 30 hours, minus 24 hours a day, that's 6 hours.
The second one is 20 hours, within a day, so it is correct.
This function, not for the second to the number of hours, less than 24 hours, still can barely




Finally, how to convert to less than 30 hours of time? For example, I have a number of seconds to 1080000, how to get 30:00:00 Thank you

------Solution--------------------
You can work it out.
$t = 108000;
echo Floor ($t/3600). Gmstrftime (':%m:%s ', $t);//30:00:00
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.