summary.ltraj <- function (object, ...) 
{
    if (!inherits(object, "ltraj")) 
        stop("object should be of class \"ltraj\"")
    id <- factor(unlist(lapply(object, function(x) attr(x, "id"))))
    burst <- unlist(lapply(object, function(x) attr(x, "burst")))
    nr <- unlist(lapply(object, nrow))
    na <- unlist(lapply(object, function(i) sum(is.na(i[, 1]))))
    if (attr(object, "typeII")) {
        beg <- unlist(lapply(object, function(i) i$date[1]))
        ## MB (2010-02-25)
        ## Next line added to take into account the time zone
        beg <- as.POSIXct(as.POSIXlt(beg, origin="1970-01-01", tz = attr(object[[1]]$date, "tzone")))
        endd <- unlist(lapply(object, function(i) i$date[nrow(i)]))
        ## MB (2010-02-25)
        ## Next line added to take into account the time zone
        endd <- as.POSIXct(as.POSIXlt(endd, origin="1970-01-01", tz = attr(object[[1]]$date, "tzone")))
        ## MB (2010-02-25)
        ## Next line removed to take into account the time zone
        ## class(beg) <- class(endd) <- c("POSIXct", "POSIXt")
        pr <- data.frame(id = id, burst = burst, nb.reloc = nr, 
            NAs = na, date.begin = beg, date.end = endd)
    }
    else {
        pr <- data.frame(id = id, burst = burst, Nb.reloc = nr, 
            NAs = na)
    }
    return(pr)
}

