Metainformationen zur Seite

LBSystem::epoch2lox

$loxonetime = epoch2lox([int $epochtime]);


This function returns from a Unix Epoch timestamp the Loxone timestamp, or, without parameter, the current time as Loxone timestamp. 

LoxBerry 1.4.2

This function is available starting with LoxBerry V1.4.2. If you use that function, set this minimum version in your plugin.cfg.

Timezones

We haven't tested this function for every timezone and every set-up. On anomalies, please report the timezone of LoxBerry to the Core developers.

The Unix Epoch timestamp are the seconds from 1st January 1970, whereas the Loxone timestamp requires the seconds from 1st January 2009.

The Loxone timestamp can be displayed in a human-readable way on some Loxone blocks like the Status block, using the display key <v.u>.

Usage

require_once "loxberry_system.php";
 
// current time minus 1 day
$yesterday = time() - 24*60*60;
$loxonetime = epoch2lox($yesterday);
 
// current time
$current_time_lox = epoch2lox();

See also