www.webdeveloper.com
Results 1 to 2 of 2

Thread: using strtotime to get seconds of future date

Hybrid View

  1. #1
    Join Date
    Apr 2012
    Posts
    110

    using strtotime to get seconds of future date

    I am trying to figure out a future date in seconds. I have the following:
    Code:
    strtotime($month . " " . $day . " " . $year . " 23:59:59");
    But when I change the m/d/y, the seconds to not change. am I using a bad format?

  2. #2
    Join Date
    Nov 2013
    Posts
    33
    use ISO 8601 format for date i.e - (2014-11-24)

    PHP Code:
    $year '2014';
    $month '11';
    $day '24';

    $fd strtotime($year "-" $month"-" $day " 23:59:59"); // time in seconds is = 1416873599

    echo date('m d Y - h:i:s'$fd); // the date format you are using 

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles