function commerce_license_set_time in Commerce License 7
Sets the current time.
Allows the current time to be overriden for testing purposes. If time hasn't been overriden, REQUEST_TIME is returned by default.
Parameters
$time: The unix timestamp to use as the current timestamp.
Return value
The updated current timestamp.
1 call to commerce_license_set_time()
- commerce_license_get_time in ./
commerce_license.module - Returns the current timestamp.
File
- ./
commerce_license.module, line 34 - Provides a framework for selling access to local or remote resources.
Code
function commerce_license_set_time($time = NULL) {
$cached_time =& drupal_static(__FUNCTION__, REQUEST_TIME);
if ($time) {
$cached_time = $time;
}
return $cached_time;
}