If you are using php 5.3+ you can use a new way to do it.
<?php
$date = new DateTime();
echo $date->getTimestamp(). "<br>";
$date->add(new DateInterval('PT674165S')); // adds 674165 secs
echo $date->getTimestamp();
?>
Related Contents:
- Convert a date format in PHP [duplicate]
- How to get time difference in minutes in PHP
- How can I compare two dates in PHP?
- PHP How to find the time elapsed since a date time? [duplicate]
- Convert seconds into days, hours, minutes and seconds
- Converting string to Date and DateTime
- Correctly determine if date string is a valid date in that format
- Add number of days to a date
- PHP DateTime::modify adding and subtracting months
- A non well formed numeric value encountered
- PHP mysql insert date format
- How to check if a date is in a given range?
- PHP get number of week for month
- Adding one day to a date
- Accessing dates in PHP beyond 2038
- Date Difference in php on days? [duplicate]
- Convert number to month name in PHP
- The first day of the current month in php using date_modify as DateTime object
- How to list all months between two dates
- How can I find the first and last date in a month using PHP?
- Adding minutes to date time in PHP
- PHP convert date format dd/mm/yyyy => yyyy-mm-dd [duplicate]
- Elegant way to get the count of months between two dates?
- Calculating days of week given a week number
- How can I check if the current date/time is past a set date/time?
- PHP: Adding months to a date, while not exceeding the last day of the month
- Day difference without weekends
- Simplest way to increment a date in PHP?
- Difference between 2 dates in seconds [duplicate]
- Round minute down to nearest quarter hour
- Find Month difference in php? [duplicate]
- How to find the date of a day of the week from a date using PHP?
- How to generate random date between two dates using php?
- How to count days between two dates in PHP?
- Get week number (in the year) from a date PHP
- Print time in 15-minute increments between two times in the same day
- get next and previous day with PHP
- how to re-format datetime string in php?
- How to sort date array in php?
- How to reformat date in PHP?
- Get week number in month from date in PHP?
- PHP date() and strtotime() return wrong months on 31st
- Check for consecutive dates within a set and return as range
- Date in a URL dd/mm/yyyy
- how to convert php date formats to GMT and vice versa?
- PHP date() in foreign languages – e.g. Mar 25 Aoû 09 [duplicate]
- Calculate total seconds in PHP DateInterval
- Adding three months to a date in PHP
- How do you explain the result for a new \DateTime(‘0000-00-00 00:00:00’)?
- PHP date returning wrong Month on subtracting one month