ITimeFactory

interface OCP\AppFramework\Utility\ITimeFactory
Needed to mock calls to time()
Implemented by:OC\AppFramework\Utility\TimeFactory
Source:lib/public/AppFramework/Utility/ITimeFactory.php#34

Methods

public OCP\AppFramework\Utility\ITimeFactory::getTime()
Source:lib/public/AppFramework/Utility/ITimeFactory.php#40
Returns:int the result of a call to time()
Since:8.0.0
public OCP\AppFramework\Utility\ITimeFactory::getDateTime($time=now, $timezone=null)
Source:

lib/public/AppFramework/Utility/ITimeFactory.php#48

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

\DateTime

Since:

15.0.0