Feature #37376
Application-wide time stamp representing "now"
Status: | Resolved | Start date: | 2012-05-21 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Utility | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 beta 2 | |||
PHP Version: | 5.3 | Complexity: | easy | |
Has patch: | No |
Description
We should provide an application-wide reference for a time reflecting "now" because:
- code using time() and comparing values with other parts of the application might, in an edge case, end up with different times, although they both mean "now"
- testing code which uses time() or new \DateTime() is cumbersome or sometimes not possible
Associated revisions
[FEATURE] Introduce "Now" as unique time reference
This patch introduces a new class called "Now" which
inherits DateTime and has the scope Singleton. It can
be used in all cases where a reliably comparable value
of "now" is needed or where time needs to be mocked
in related tests.
Change-Id: I551ccab2b0f478949342ce7657ba4bcb6b7cac09
Resolves: #37376
Releases: 1.1, 1.2
[FEATURE] Introduce "Now" as unique time reference
This patch introduces a new class called "Now" which
inherits DateTime and has the scope Singleton. It can
be used in all cases where a reliably comparable value
of "now" is needed or where time needs to be mocked
in related tests.
Change-Id: Iaf8ab7605299b4fd809161ab1f4b5b121a4dcb2d
Resolves: #37376
Releases: 1.1, 1.2
History
#1 Updated by Gerrit Code Review about 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11393
#2 Updated by Gerrit Code Review about 3 years ago
Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11394
#3 Updated by Robert Lemke about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 87120b37fa21b92c02fcce53279a03cc0b0c987a.