diff options
author | Thomas Steur <thomas.steur@gmail.com> | 2015-08-12 18:23:38 +0300 |
---|---|---|
committer | Thomas Steur <thomas.steur@gmail.com> | 2015-08-21 12:48:31 +0300 |
commit | 500202b12aa8879c7deb09035792c9aab99f9da2 (patch) | |
tree | 47421d728fdb61a5ed09c1a0e943b9a074184e1f /core/Date.php | |
parent | aa8591b6e58fa5e9964cacc405493abe7bb80eaf (diff) |
refs #8066 faster query to find websites with traffic since last successful archiving
Diffstat (limited to 'core/Date.php')
-rw-r--r-- | core/Date.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/Date.php b/core/Date.php index 4f792200e2..1448c23826 100644 --- a/core/Date.php +++ b/core/Date.php @@ -710,6 +710,17 @@ class Date } /** + * Subtracts `$n` seconds from `$this` date and returns the result in a new Date. + * + * @param int $n Number of seconds to subtract. Can be less than 0. + * @return \Piwik\Date + */ + public function subSeconds($n) + { + return new Date($this->timestamp - $n, $this->timezone); + } + + /** * Adds a period to `$this` date and returns the result in a new Date instance. * * @param int $n The number of periods to add. Can be negative. |