SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict MarekS's Avatar
    Join Date
    Jan 2003
    Location
    Estonia / Tallinn
    Posts
    201
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    seconds left until 00:00:00 (24h) ?

    I have a working code that gives me the number of remaining seconds til the next day starts:

    PHP Code:
    $remain 86400 - ((date('H'time()) * 3600) +
                       (
    date('i'time()) * 60) +
                        
    date('s'time())); 
    The question is - is there a better way to do it? Then again - this is pretty clean anyway, but still... anyone?

    Thank U indeed,

    - MarekS -

  2. #2
    SitePoint Wizard
    Join Date
    May 2003
    Location
    Berlin, Germany
    Posts
    1,829
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This seems to be the only method possible. Not too sure though.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •