Documentation
IPS_GetDemoExpiration
int IPS_GetDemoExpiration ()
Returns
Unix timestamp at which the demo mode expires. 0 if there is no time limit.
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns the time at which the demo mode of IP-Symcon expires as Unix timestamp. For a valid full version with a sufficient subscription and for the Community Edition, 0 is returned.
The time is determined at the start of IP-Symcon:
| Situation | Expiration time |
|---|---|
| No valid license | 1 hour after the start |
| Demo license with valid subscription | End of the subscription |
| Demo license whose subscription has expired or could not be retrieved | 6 hours after the start |
| Full version whose subscription expired before the build date of the installed version | 48 hours after the start |
After expiration, various actions fail with "Demo expired! ...". The build date of the installed version is returned by IPS_GetKernelDate, the end of the subscription by IPS_GetSubscriptionExpiration.
Example
$expiration = IPS_GetDemoExpiration();
if ($expiration == 0) {
echo "No time limit";
} else {
echo "Demo mode ends on " . date("Y-m-d H:i", $expiration);
}