Documentation
IPS_GetReplicationFailoverTime
int IPS_GetReplicationFailoverTime ()
Returns
Unix timestamp of the last promotion to master. If the slave has never been promoted, 0 is returned.
Description
This function is intended for internal use only and may change or be removed at any time without notice.
The function returns the point in time at which the slave was last promoted to master (failover), either via IPS_PromoteToReplicationMaster or automatically.
The value is kept even after IPS_DemoteToReplicationSlave and is only reset on a restart of the service. Whether the failover is currently active is returned by IPS_IsReplicationFailoverActive.
Example
$failoverTime = IPS_GetReplicationFailoverTime();
if ($failoverTime > 0) {
echo "Last failover: " . date("Y-m-d H:i:s", $failoverTime);
}
/* e.g. returns:
Last failover: 2026-09-14 03:12:45
*/