{ "info": { "author": "Randall Degges", "author_email": "rdegges@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# easytime\n\nThe simplest python time library ever written.\n\n\n## Why a Time Library?\n\nHandling times in python is painful. This library makes it not painful. That is\nthe reason.\n\nI know there are plenty of ways to handle this sort of thing, but this is my\nway, and I enjoy it.\n\nMaybe you will too.\n\n\n## Usage\n\nUsing `easytime` is, well, ... *easy*. There are only a couple things you need\nto know:\n\n1. Always use UTC when handling time in your program. The best way to do this\n is via the `easytime.utcnow()` method, for instance:\n\n ```python\n >>> from easytime import easytime\n >>> now = easytime.utcnow()\n >>> now\n easytime(2012, 11, 18, 16, 53, 30, 316026)\n ```\n\n2. **Only use timezones to display time data to users!** This means that you\n should keep your time in UTC always, until the very last second when you have\n to display time to your user. To do this, you can use the\n `easytime.convert()` method:\n\n ```python\n >>> from easytime import easytime\n >>> now = easytime.utcnow()\n >>> now\n easytime(2012, 11, 19, 0, 56, 30, 847490)\n >>> now.convert('America/Los_Angeles') # Convert the time to LA time.\n datetime.datetime(2012, 11, 18, 16, 56, 30, 847490, tzinfo=)\n >>> now.convert('Europe/Berlin') # Convert the time to Berlin time.\n datetime.datetime(2012, 11, 19, 1, 56, 30, 847490, tzinfo=)\n ```\n\n**If you follow the above two rules, you will no longer hate your life each\ntime you need to use timezones.**\n\n\n## Details\n\n`easytime` is really nothing more than a simple wrapper around python's built-in\n`datetime.datetime` type. Every `easytime` object is a `datetime` object, with\ntwo exceptions:\n\n- You have access to a new method, `convert`, which allows you to specify a\n timezone (the full list is available here:\n http://en.wikipedia.org/wiki/List_of_tz_database_time_zones) to convert your\n datetime into. This is how you can display the time in different local\n timezones.\n\n- You are forced to use UTC. Even if you try to generate a local time, eg:\n `datetime.datetime.now()`, you'll get back UTC, because `easytime` overrides\n it.\n\nYou can do anything with `easytime` that you can do with a normal\n`datetime.datetime` object, so be sure to read the official [Python\ndatetime](http://docs.python.org/2/library/datetime.html) documentation if you\nneed to do anything more advanced.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/rdegges/easytime", "keywords": "python time simple easy timezone", "license": "UNLICENSE", "maintainer": null, "maintainer_email": null, "name": "easytime", "package_url": "https://pypi.org/project/easytime/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/easytime/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/rdegges/easytime" }, "release_url": "https://pypi.org/project/easytime/0.1.2/", "requires_dist": null, "requires_python": null, "summary": "The simplest python time library ever written.", "version": "0.1.2" }, "last_serial": 791522, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "9cadb90f7b6d0fa97ec15b41779ebab8", "sha256": "42963a88a61af334ecb092205b647a494a1d22540600f7995592fcd1df9cfe1f" }, "downloads": -1, "filename": "easytime-0.1.0.tar.gz", "has_sig": false, "md5_digest": "9cadb90f7b6d0fa97ec15b41779ebab8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2585, "upload_time": "2012-11-19T01:08:00", "url": "https://files.pythonhosted.org/packages/60/42/898508a9e6ffdb016d24a2a87de443179083a3292413f621063c877bb3d3/easytime-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "f58c474f01b05c2799f5cf69e5d64354", "sha256": "87303aaa6ef73b2ad09c4722782ae0bc0e6ca76dbd7ee1af5faa57d76c9d5805" }, "downloads": -1, "filename": "easytime-0.1.1.tar.gz", "has_sig": false, "md5_digest": "f58c474f01b05c2799f5cf69e5d64354", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2860, "upload_time": "2012-11-19T01:09:38", "url": "https://files.pythonhosted.org/packages/2b/78/f23c45f15aa83f9d7408911bbf0288e3018a72465b80bb9ac10aea571b0b/easytime-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "0a55aba541a8033394aecd16c2082c5b", "sha256": "cf7d3cd2e26a1a1b82bcbf94bc3b75bbee39bf10faf8290dd5a4f67c1b7c5100" }, "downloads": -1, "filename": "easytime-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0a55aba541a8033394aecd16c2082c5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2844, "upload_time": "2012-11-19T01:11:58", "url": "https://files.pythonhosted.org/packages/ba/9e/e549dddcb90a8e4cd0834525709ff077ef66689f9c80a0cc9fc687592a86/easytime-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0a55aba541a8033394aecd16c2082c5b", "sha256": "cf7d3cd2e26a1a1b82bcbf94bc3b75bbee39bf10faf8290dd5a4f67c1b7c5100" }, "downloads": -1, "filename": "easytime-0.1.2.tar.gz", "has_sig": false, "md5_digest": "0a55aba541a8033394aecd16c2082c5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2844, "upload_time": "2012-11-19T01:11:58", "url": "https://files.pythonhosted.org/packages/ba/9e/e549dddcb90a8e4cd0834525709ff077ef66689f9c80a0cc9fc687592a86/easytime-0.1.2.tar.gz" } ] }