def _get_pkg_install_time(pkg):
    iso_time = None
    if pkg is not None:
        location = "/var/lib/dpkg/info/{0}.list".format(pkg)
        if os.path.exists(location):
            iso_time = datetime.datetime.utcfromtimestamp(int(os.path.getmtime(location))).isoformat() + "Z"

    return iso_time
Return package install time, based on the /var/lib/dpkg/info/<package>.list
dataset/ETHPy150Open saltstack/salt/salt/modules/dpkg.py/_get_pkg_install_time