public function beforeSave(Event $event, EntityInterface $entity, ArrayObject $options)
    {
        if (empty($entity->created)) {
            $entity->created = new Time;
        } elseif (!empty($entity->created) && !$entity->created instanceof Time) {
            $entity->created = new Time($entity->created);
        }
    }