public function getTime()
    {
        $time = $this->data->getInvoiceTime();

        if ($time instanceof \DateTime) {
            return $time->format('c');
        }

        return date('c', $time/1000); // time in ms
    }