Feature #37376

Application-wide time stamp representing "now"

Added by Robert Lemke about 3 years ago. Updated about 3 years ago.

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

Revision 7f9fb7db
Added by Robert Lemke about 3 years ago

[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

Revision 87120b37
Added by Robert Lemke about 3 years ago

[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

Also available in: Atom PDF