{ "info": { "author": "Steven Buss", "author_email": "steven.buss@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 2.7" ], "description": "=====\nwtftz\n=====\n\nWTF Timezones?!\n===============\n\nI can't convert UTC to PST in my head, and google can't do it for me either.\n\nEvery timezone converter website is full of spam and the worst UX imaginable.\n\nwtftz assumes you're trying to convert a UTC timestamp\n------------------------------------------------------\n\n.. code:: python\n\n print(wtftz.convert(\"2012-12-10T18:31:29.214653\", \"pst\"))\n # 2012-12-10 10:31:29.214653\n\nunless you're not\n-----------------\n\nNote the embedded timezone in this iso-formatted string.\n\n.. code:: python\n\n print(wtftz.convert(\"2012-12-10T18:31:29.214653-08:00\", \"pst\"))\n # 2012-12-10 18:31:29.214653\n\nwtftz knows a few common abbreviations for timezones\n----------------------------------------------------\n\n.. code:: python\n\n print(wtftz.convert(\"1355236920\", \"est\"))\n # 2012-12-11 01:42:00\n # Sorry, Australia! EST is most commonly used for US/Eastern!\n\nwtftz gives back tzinfo-free timestamps because python's timezones are broken!\n------------------------------------------------------------------------------\n\n.. code:: python\n\n print(wtftz.convert(datetime.datetime.now(), from_tz=\"pst\", to_tz=\"utc\"))\n # 2012-12-11 06:45:04.075608\n print(wtftz.convert(datetime.datetime.now(), from_tz=\"pst\", to_tz=\"eastern\"))\n # 2012-12-11 01:45:18.343536\n\nwtftz knows that you don't know if the current time is PST or PDT\n-----------------------------------------------------------------\n\nBut it does the right thing, using PST or PDT when appropriate\n\n.. code:: python\n\n print(wtftz.convert(datetime.datetime.now(), \"pst\"))\n # 2012-12-11 06:48:39.860947\n print(wtftz.convert(datetime.datetime.now(), \"pdt\"))\n # 2012-12-11 06:48:39.860947\n\nwtftz knows that you work with systems with nonstandard timestamp formats\n-------------------------------------------------------------------------\n\n.. code:: python\n\n print(wtftz.convert('2012/10/7 12:25:46', 'pst'))\n # 2012-10-07 19:25:46 \n print(wtftz.convert('7 October 2012 12:25:46', 'pst'))\n # 2012-10-07 19:25:46 \n\nwtftz will accept proper timezone names, too\n--------------------------------------------\n\n.. code:: python\n\n print(wtftz.convert(datetime.datetime.now(), \"US/Pacific\"))\n # 2012-12-10 15:04:03.644934\n print(wtftz.convert(datetime.datetime.now(), \"America/Chicago\"))\n # 2012-12-10 17:04:03.650494\n\nBut it can't handle everything\n------------------------------\n\n.. code:: python\n\n print(wtftz.convert('2012:10:7:12:25:46', 'pst'))\n # ...\n # ValueError: Cannot parse timestamp 2012:10:7:12:25:46\n\nUse it from the shell!\n----------------------\n\n.. code:: sh\n\n $ date && ./wtftz \"`date`\" pst && ./wtftz \"`date`\" utc\n Mon Dec 10 23:43:06 PST 2012\n 2012-12-10 23:43:06\n 2012-12-11 07:43:06\n $ date +%s && ./wtftz \"`date +%s`\" utc\n 1355211747\n 2012-12-10 23:42:27\n\nWtftz can also handle free text strings\n---------------------------------------\n\n.. code:: python\n\n print(wtftz.convert_free(\"1355236920 to est\"))\n # 2012-12-11 01:42:00\n print(wtftz.convert_free(\"2012-12-10T18:31:29.214653-08:00 to est\"))\n # 2012-12-10 21:31:29.214653\n print(wtftz.convert_free(\"2012-12-10T18:31:29.214653 from pst to est\"))\n # 2012-12-10 21:31:29.214653\n print(wtftz.convert_free(\"2012-12-10T18:31:29.214653 from utc to est\"))\n # 2012-12-10 13:31:29.214653\n\nInstallation\n============\n\n`wtftz `_ is in the cheese shop, so just:\n\n.. code:: sh\n\n pip install wtftz\n\nDevelopment\n===========\n\nIssues and Pull Requests are welcome!\n\nI'm looking to expand the list of common timezone names to include foreign\n(to me) timezones and make the free-text parser smarter.\n\n\nTesting\n-------\n\nTests are important. Pull requests will not be accepted without them.\n\n.. code:: sh\n\n python -m unittest discover\n\nReadme\n------\n\nThis README should be updated with examples as new behavior is added. To\nensure that the file is formatted correctly, please check it:\n\n.. code:: sh\n\n pip install docutils\n pip install pygments\n python setup.py --long-description | rst2html.py > output.html\n\nEnsure that the file parses and looks good.", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/sbuss/wtftz/tarball/v0.2.4", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sbuss/wtftz", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "wtftz", "package_url": "https://pypi.org/project/wtftz/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/wtftz/", "project_urls": { "Download": "https://github.com/sbuss/wtftz/tarball/v0.2.4", "Homepage": "https://github.com/sbuss/wtftz" }, "release_url": "https://pypi.org/project/wtftz/0.2.4/", "requires_dist": null, "requires_python": null, "summary": "Convert a timestamp from one timezone to another", "version": "0.2.4" }, "last_serial": 801772, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "3fda1e4f89430f93eef959b062a1e3f0", "sha256": "8b071d95538c0af5c925a87721c37591dff5ceedc738f968e05e3b46e322b792" }, "downloads": -1, "filename": "wtftz-0.1.0.tar.gz", "has_sig": false, "md5_digest": "3fda1e4f89430f93eef959b062a1e3f0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3089, "upload_time": "2012-12-11T19:32:05", "url": "https://files.pythonhosted.org/packages/c0/09/a1b499befc7a9441fba74d3d2a4683a54e5c089b37388288d28d45699066/wtftz-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "b8e1447a5b5dcab2ba72244bdbabbffc", "sha256": "5c3e0a7374be54877c7e3de72322e5373e571a44fd0b5b4f6becf28ada965cbc" }, "downloads": -1, "filename": "wtftz-0.1.1.tar.gz", "has_sig": false, "md5_digest": "b8e1447a5b5dcab2ba72244bdbabbffc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3798, "upload_time": "2012-12-11T20:25:17", "url": "https://files.pythonhosted.org/packages/be/19/036e5abc28bf3ace29da242de98e8706bce1095af00060d2b5546c647f3a/wtftz-0.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "4fd503cdbe69131c378c7f15dcff5b38", "sha256": "1b96326c9241c7e40373cd4dfd2c4ddbefeb42c41a3381359e14616a0f2951b6" }, "downloads": -1, "filename": "wtftz-0.2.0-py2.7.egg", "has_sig": false, "md5_digest": "4fd503cdbe69131c378c7f15dcff5b38", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9274, "upload_time": "2012-12-23T22:05:44", "url": "https://files.pythonhosted.org/packages/66/b4/aa156e1b01d78350cca22ddfbd140c84b88b645e7e368729f067634d7872/wtftz-0.2.0-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "96ce456cf44094d8e38409097993829a", "sha256": "6cf3830a1dfa760c7860b28cfe024f3b8127a42e5aa8921787f3bc481ea3745f" }, "downloads": -1, "filename": "wtftz-0.2.0.tar.gz", "has_sig": false, "md5_digest": "96ce456cf44094d8e38409097993829a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5202, "upload_time": "2012-12-23T22:02:41", "url": "https://files.pythonhosted.org/packages/c5/96/3687236db7283786519765e6803d74b81e9f9abcc272b78bcff07580f483/wtftz-0.2.0.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "dfb76031f4ecebf989186224bb65fea9", "sha256": "877395542fefc4a6f3ad86e486d846057a908b0fede0d08a282f8880fab2b6bc" }, "downloads": -1, "filename": "wtftz-0.2.1-py2.7.egg", "has_sig": false, "md5_digest": "dfb76031f4ecebf989186224bb65fea9", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9273, "upload_time": "2012-12-23T23:15:07", "url": "https://files.pythonhosted.org/packages/59/cf/0d23008ade593bfd3439029baae15bc107be6a8d03e6ef0deaa8fe557486/wtftz-0.2.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "9c4b2de7a4785494d63dd3ac9855e7d7", "sha256": "3a5657507e9768f6a64b0e0b95721b11ca75a675598a2238ac19d0e65922da47" }, "downloads": -1, "filename": "wtftz-0.2.1.tar.gz", "has_sig": false, "md5_digest": "9c4b2de7a4785494d63dd3ac9855e7d7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5224, "upload_time": "2012-12-23T23:14:47", "url": "https://files.pythonhosted.org/packages/35/86/399c90e1c20d0293a4c0dfd0bb3900c3b4c89006afff765922758731ea71/wtftz-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "29c08a026c36ba18c656ecc52aba84f6", "sha256": "435e701672865471b53f6b0cbb0bd90e72a57be200f3d244aa89cb060a87909e" }, "downloads": -1, "filename": "wtftz-0.2.2-py2.7.egg", "has_sig": false, "md5_digest": "29c08a026c36ba18c656ecc52aba84f6", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9308, "upload_time": "2012-12-24T07:26:30", "url": "https://files.pythonhosted.org/packages/c7/86/ffab687e83a63568bab21e28d270fc9d730c26adc28106c272702a177ce0/wtftz-0.2.2-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "875a4fa388a17bd74b3abb5bf1abecdf", "sha256": "5f260918091e238efa1f55e31604329d0f52b348c62da00576b89dcffae965b5" }, "downloads": -1, "filename": "wtftz-0.2.2.tar.gz", "has_sig": false, "md5_digest": "875a4fa388a17bd74b3abb5bf1abecdf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5241, "upload_time": "2012-12-24T07:26:14", "url": "https://files.pythonhosted.org/packages/02/78/9b487c5245b8df3c6f4c58573ca021a613f3246a761eca304798ca8fb1eb/wtftz-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "3e0f699e1ed0a9267594967743c48fa5", "sha256": "eec887c80bea914e1bf65d002f5e5cc995b41a2a49803523355a7b59f6f30b98" }, "downloads": -1, "filename": "wtftz-0.2.3-py2.7.egg", "has_sig": false, "md5_digest": "3e0f699e1ed0a9267594967743c48fa5", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 9329, "upload_time": "2012-12-24T07:36:39", "url": "https://files.pythonhosted.org/packages/2c/49/0d06968835c0230cc57d373ccc946ce40559fa3b718834d86c7986c94176/wtftz-0.2.3-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "ca43508d2735cbabaa84c967826c09c1", "sha256": "b39e0539c257d7eb581bb069227089d0a58fe04f47ee5651ff25679deef85150" }, "downloads": -1, "filename": "wtftz-0.2.3.tar.gz", "has_sig": false, "md5_digest": "ca43508d2735cbabaa84c967826c09c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5252, "upload_time": "2012-12-24T07:36:37", "url": "https://files.pythonhosted.org/packages/63/3e/b5de1993d326a80f9845ef69e4b59b592d81de0fed3cfedb1444848e6068/wtftz-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "7249d2b2c387a1073bf0bbd3e70ca773", "sha256": "25316fea8d73d11b8180d0e6a2707c10a3edbf5f3d5f4e1709b00a346289fd39" }, "downloads": -1, "filename": "wtftz-0.2.4-py2.7.egg", "has_sig": false, "md5_digest": "7249d2b2c387a1073bf0bbd3e70ca773", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 10450, "upload_time": "2012-12-26T01:38:44", "url": "https://files.pythonhosted.org/packages/9e/ae/758efe7830dcf9c600962106717b61e964cadd902a66e9f6867b60fd017b/wtftz-0.2.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "b998fccc7b58f2f0f96f93d283d6357a", "sha256": "6db466e9251cc05c4bb64dcca1e40f0d8f9c098ab93467b4e90ec5469c824757" }, "downloads": -1, "filename": "wtftz-0.2.4.tar.gz", "has_sig": false, "md5_digest": "b998fccc7b58f2f0f96f93d283d6357a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5754, "upload_time": "2012-12-26T01:38:43", "url": "https://files.pythonhosted.org/packages/5f/86/147b83b3c3b2481341205fb737db2e51389260f32b893b6359263631d8ac/wtftz-0.2.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7249d2b2c387a1073bf0bbd3e70ca773", "sha256": "25316fea8d73d11b8180d0e6a2707c10a3edbf5f3d5f4e1709b00a346289fd39" }, "downloads": -1, "filename": "wtftz-0.2.4-py2.7.egg", "has_sig": false, "md5_digest": "7249d2b2c387a1073bf0bbd3e70ca773", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 10450, "upload_time": "2012-12-26T01:38:44", "url": "https://files.pythonhosted.org/packages/9e/ae/758efe7830dcf9c600962106717b61e964cadd902a66e9f6867b60fd017b/wtftz-0.2.4-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "b998fccc7b58f2f0f96f93d283d6357a", "sha256": "6db466e9251cc05c4bb64dcca1e40f0d8f9c098ab93467b4e90ec5469c824757" }, "downloads": -1, "filename": "wtftz-0.2.4.tar.gz", "has_sig": false, "md5_digest": "b998fccc7b58f2f0f96f93d283d6357a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5754, "upload_time": "2012-12-26T01:38:43", "url": "https://files.pythonhosted.org/packages/5f/86/147b83b3c3b2481341205fb737db2e51389260f32b893b6359263631d8ac/wtftz-0.2.4.tar.gz" } ] }