{
  "id": "time",
  "name": "time",
  "description": "",
  "version": "0.1.0",
  "author": "",
  "license": "MIT",
  "tags": [
    "python-stdlib"
  ],
  "status": "HUMAN_REVIEWED",
  "official": true,
  "source": "https://github.com/micropython/micropython-lib/tree/master/python-stdlib/time",
  "updatedAt": "2025-05-27T04:19:19.510Z",
  "page": "https://checkmim.com/packages/time",
  "createdAt": "2025-05-27T04:19:19.510Z",
  "install": {
    "mpremote": "mpremote mip install time",
    "mip": "import mip; mip.install(\"time\")"
  },
  "readme": "# time\n\nThis library _extends_ the built-in [MicroPython `time`\nmodule](https://docs.micropython.org/en/latest/library/time.html#module-time) to\ninclude\n[`time.strftime()`](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior).\n\n`strftime()` is omitted from the built-in `time` module to conserve space.\n\n## Installation\n\nUse `mip` via `mpremote`:\n\n```bash\n> mpremote mip install time\n```\n\nSee [Package management](https://docs.micropython.org/en/latest/reference/packages.html) for more details on using `mip` and `mpremote`.\n\n## Common uses\n\n`strftime()` is used when using a logging [Formatter\nObject](https://docs.python.org/3/library/logging.html#formatter-objects) that\nemploys\n[`asctime`](https://docs.python.org/3/library/logging.html#formatter-objects).\n\nFor example:\n\n```python\nlogging.Formatter('%(asctime)s | %(name)s | %(levelname)s - %(message)s')\n```\n\nThe expected output might look like:\n\n```text\nTue Feb 17 09:42:58 2009 | MAIN | INFO - test\n```\n\nBut if this `time` extension library isn't installed, `asctime` will always be\n`None`:\n\n\n```text\nNone | MAIN | INFO - test\n```\n"
}