Today I needed a script listing all workstations imported by ZENworks in eDirectory, reporting the last inventory scan date.  With a few lines of code, this was accomplished.
Converting the inventoryscan date was the hardest part as this was something I hadn't done before. Here's the code I used to convert the date.
I first had to devide the value of the inventory scan date by 1000, then I could run getdate(builtin function) and then send the results to be echo'ed to a table.
function calc_time($z) {
    global $tm_rslt;
    $y = $z / (1000);
    $tm_rslt=(getdate($y));
    return($tm_rslt);
    }
You can download the whole script here
 
