TimeFactory

class OC\AppFramework\Utility\TimeFactory
Needed to mock calls to time()
Source:lib/private/AppFramework/Utility/TimeFactory.php#36
Implements:OCP\AppFramework\Utility\ITimeFactory

Methods

public OC\AppFramework\Utility\TimeFactory::getTime()
Source:lib/private/AppFramework/Utility/TimeFactory.php#42
Returns:int the result of a call to time()
public OC\AppFramework\Utility\TimeFactory::getDateTime($time=now, $timezone=null)
Source:

lib/private/AppFramework/Utility/TimeFactory.php#52

Parameters:
  • $time (string)
  • $timezone (DateTimeZone)
Returns:

\DateTime

Since:

15.0.0