$time = strtotime('10:00');
$startTime = date("H:i", strtotime('-30 minutes', $time));
$endTime = date("H:i", strtotime('+30 minutes', $time));
More Related Contents:
- PHP 01/01/1970 Issues with Date Fields
- strtotime With Different Languages?
- Simplest way to increment a date in PHP?
- What is a Unix timestamp and why use it?
- PHP date() and strtotime() return wrong months on 31st
- How to get previous month and year relative to today, using strtotime and date?
- php function for get all mondays within date range
- How to get closest date compared to an array of dates in PHP
- PHP, Get tomorrows date from date
- Adding three months to a date in PHP
- php strtotime “last monday” if today is monday?
- PHP strtotime +1 month behaviour
- PHP: strtotime is returning false for a future date?
- DateTime class vs. native PHP date-functions
- Getting all dates for Mondays and Tuesdays for the next year
- adding 30 minutes to datetime php/mysql
- Working days (Mon-Fri) in PHP
- How to convert week number and year into unix timestamp?
- PHP strtotime +1 month adding an extra month [duplicate]
- php – add two hours to date variable
- PHP: How to check if a date is today, yesterday or tomorrow
- date() method, “A non well formed numeric value encountered” does not want to format a date passed in $_POST
- Getting first weekday in a month with strtotime
- Determine If Business Is Open/Closed Based On Business Hours
- How to execute a line of code once?
- How to push both value and key into PHP array
- concat a for loop – php
- PHP – count specific array values
- Insert elements from one array (one-at-a-time) after every second element of another array (un-even zippering)
- Fastest way to extract a specific frame from a video (PHP/ffmpeg/anything)