How to use the libmozdata.utils.get_date_str function in libmozdata

To help you get started, we’ve selected a few libmozdata examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mozilla / relman-auto-nag / auto_nag / scripts / code_freeze_week.py View on Github external
def handler_rev(json, data):
            push = json["pushdate"][0]
            push = datetime.datetime.utcfromtimestamp(push)
            push = lmdutils.as_utc(push)
            data["date"] = lmdutils.get_date_str(push)
            data["backedout"] = utils.is_backout(json)
            m = BUG_PAT.search(json["desc"])
            if not m or m.group(1) != data["bugid"]:
                data["bugid"] = ""
github mozilla / relman-auto-nag / auto_nag / scripts / code_freeze_week.py View on Github external
def get_extra_for_template(self):
        return {
            "nightly": self.nightly,
            "beta": self.beta,
            "release": self.release,
            "date": lmdutils.get_date_str(self.date),
        }
github mozilla / relman-auto-nag / auto_nag / utils.py View on Github external
def get_info_from_hg(json):
    res = {}
    push = json["pushdate"][0]
    push = datetime.datetime.utcfromtimestamp(push)
    push = lmdutils.as_utc(push)
    res["date"] = lmdutils.get_date_str(push)
    res["backedout"] = json.get("backedoutby", "") != ""
    m = BUG_PAT.search(json["desc"])
    res["bugid"] = m.group(1) if m else ""

    return res