{ "info": { "author": "Binghuan Zhang", "author_email": "574953550@qq.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Topic :: Internet", "Topic :: Internet :: WWW/HTTP", "Topic :: Utilities" ], "description": "# ut2d\n[![PyPI version](https://img.shields.io/badge/pypi-0.3.x-brightgreen.svg)](https://pypi.org/project/ut2d/)\n\n__ut2d__ (unix timestamp to datetime) is a tiny command-line utility to convert unix timestamp into human readable datetime. This tool intends to use the least amount of related packages or the complicated calculations and convertions on datetime topic, and provide a very simple interface to help you convert unix timestamp in a super quick manner.\n\nHere is a list of all functionalities supported (details are in __Examples__ section):\n- get datetime of given ut;\n- get datetime of now;\n- get datetime and calculate time difference from now;\n- get datetime and find the given time in certain timezone;\n- get datetime and find the given time (with scrapper) in certain city (any city);\n\nIf you work with unix timestamp a lot or need a tiny utility to get the time of another city that linux `date` command cannot provide, `ut2d` can hopefully make your life a little bit easier.\n\n## Installation\n\nprerequisite: __Python 3.6__ or above\n\n`$ pip install ut2d`\n\n## Examples\n\n### get datetime of given UT\n```console\n$ ut2d 1547671090\nUnix Timestamp: 1547671090.0\nLocal: Wed, Jan 16, 2019 03:38PM\nGMT : Wed, Jan 16, 2019 08:38PM\n```\n\n### get datetime of now\n```console\n$ ut2d now\nUnix Timestamp: 1547671189.5133939\nLocal: Wed, Jan 16, 2019 03:39PM\nGMT : Wed, Jan 16, 2019 08:39PM\n```\n\n### get datetime and calculate time difference from now\n```console\n$ ut2d 1547671090 -d\nUnix Timestamp: 1547671090.0\nLocal: Wed, Jan 16, 2019 03:38PM\nGMT : Wed, Jan 16, 2019 08:38PM\nGiven time is 11 mins, 5 secs ago\n```\n\n### get datetime and find the given time in certain timezone\nProvide timezone with prefix \"GMT\" or \"UTC\".\n\n```console\n$ ut2d now -tz \"GMT+8\"\nUnix Timestamp: 1550257565.5289779\nLocal: Fri, Feb 15, 2019 02:06PM\nGMT : Fri, Feb 15, 2019 07:06PM\n\ud83d\ude0e The given time in GMT+8 is: Sat, Feb 16, 2019 03:06AM.\n```\n\n### get datetime and find the given time in certain city\nThis is done by scraping the city's timezone from search engines, and calculate the datetime of the given unix timestamp of the given city.\n\nIf searching \"New York\"... (I'm in Boston)\n```console\n$ ut2d 1547671090 -d -c \"New York\"\nUnix Timestamp: 1547671090.0\nLocal: Wed, Jan 16, 2019 03:38PM\nGMT : Wed, Jan 16, 2019 08:38PM\nGiven time is 15 mins, 42 secs ago\n\ud83d\ude1b I am finding your city on popular search engines! Plz wait a sec...\n\ud83d\ude0e I suppose the given time in New York is: Wed, Jan 16, 2019 03:38PM. I have 88% confidence with this result from search engines!\n```\n\nYou can use `now` with the `-c` flag to get the local time of any city, and you can even use other languages. e.g. \u5317\u4eac is Beijing, and Montreuil-Juign\u00e9 is a city in France.\n```console\n$ ut2d now -c \"\u5317\u4eac\"\nUnix Timestamp: 1547673691.203567\nLocal: Wed, Jan 16, 2019 04:21PM\nGMT : Wed, Jan 16, 2019 09:21PM\n\ud83d\ude1b I am finding your city on popular search engines! Plz wait a sec...\n\ud83d\ude0e I suppose the given time in \u5317\u4eac is: Thu, Jan 17, 2019 05:21AM. I have 88% confidence with this result from search engines!\n\n$ ut2d now -c \"Montreuil-Juign\u00e9\"\nUnix Timestamp: 1547673563.7226071\nLocal: Wed, Jan 16, 2019 04:19PM\nGMT : Wed, Jan 16, 2019 09:19PM\n\ud83d\ude1b I am finding your city on popular search engines! Plz wait a sec...\n\ud83d\ude0e I suppose the given time in Montreuil-Juign\u00e9 is: Wed, Jan 16, 2019 10:19PM. I have 88% confidence with this result from search engines!\n```\n\nYou can search anything here! But if it cannot find on the search engines it will not print out the time.\n\n## License\n\nThis software is distributed under the [MIT license](https://raw.github.com/soimort/you-get/master/LICENSE.txt).\n\n## Author\n\nWritten by [Binghuan Zhang](https://github.com/estepona)", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/estepona/ut2d", "keywords": "timestamp datetime command-line scrap", "license": "", "maintainer": "", "maintainer_email": "", "name": "ut2d", "package_url": "https://pypi.org/project/ut2d/", "platform": "", "project_url": "https://pypi.org/project/ut2d/", "project_urls": { "Homepage": "https://github.com/estepona/ut2d" }, "release_url": "https://pypi.org/project/ut2d/0.3.2/", "requires_dist": null, "requires_python": "", "summary": "a command-line utility to convert unitx timestamp into human readable datetime", "version": "0.3.2" }, "last_serial": 4952244, "releases": { "0.1.2": [ { "comment_text": "", "digests": { "md5": "c2d88c4bf7d753160e8a84a920fd27f7", "sha256": "10674fe7893a698cb0a3a4b48d1b5fec27d94cf445a1f3c9ab4adafe2120fa36" }, "downloads": -1, "filename": "ut2d-0.1.2.tar.gz", "has_sig": false, "md5_digest": "c2d88c4bf7d753160e8a84a920fd27f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5509, "upload_time": "2019-01-16T23:57:10", "url": "https://files.pythonhosted.org/packages/e3/0d/3cd30e19612d5c10b8f647182e4ffe665d609103ec89cb5b1663b4d3ebdd/ut2d-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "7b45e7bcff11f65a2853640fc6c8a0df", "sha256": "f8ffaa6aec32f60500dda297e05f4fda7b47ba701a1ebd33490b31690a4327d4" }, "downloads": -1, "filename": "ut2d-0.1.3.tar.gz", "has_sig": false, "md5_digest": "7b45e7bcff11f65a2853640fc6c8a0df", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5597, "upload_time": "2019-01-17T00:39:12", "url": "https://files.pythonhosted.org/packages/99/c2/449217e12bad37b78ae835cdf4bae75d3613439be144a66b38ecae50203f/ut2d-0.1.3.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "6b428131da8c5c38ccf956595997619e", "sha256": "b7a1e8136f047c18b31dda917c22e465f17566fe6217366f3e527aa5649f1440" }, "downloads": -1, "filename": "ut2d-0.2.0.tar.gz", "has_sig": false, "md5_digest": "6b428131da8c5c38ccf956595997619e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5903, "upload_time": "2019-02-15T19:18:31", "url": "https://files.pythonhosted.org/packages/c7/81/4f54b25cac05042175353d5ca53411ac72f5a7b25c1982af65cde660bccf/ut2d-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "de6c5ff1619ad487383e9b745837a7cc", "sha256": "391badeb713b34cb245754cd77f7db7bdc3fac7ad9b4753c352217dcd436bdb4" }, "downloads": -1, "filename": "ut2d-0.3.0.tar.gz", "has_sig": false, "md5_digest": "de6c5ff1619ad487383e9b745837a7cc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7792, "upload_time": "2019-03-18T04:27:05", "url": "https://files.pythonhosted.org/packages/37/30/2fcf2d41b0de627fe52bdffbdf214d9290904a77c1bfe97571c92d55d11e/ut2d-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "28c69f7d3cf2eaa76fa2e5e3de97c300", "sha256": "402666d1eacb55a19e8b71072bef9ed8f0aeef590490b84b0c055ecab1027c0e" }, "downloads": -1, "filename": "ut2d-0.3.1.tar.gz", "has_sig": false, "md5_digest": "28c69f7d3cf2eaa76fa2e5e3de97c300", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7790, "upload_time": "2019-03-18T04:44:50", "url": "https://files.pythonhosted.org/packages/c6/a2/d4416f88a872132734a5ac801a5a2464e805fb3f56e0cb28df0e32935e57/ut2d-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "657dbfe798d683c69b116179d868f31b", "sha256": "efe00109829b90445d83b4f0a32dc0446aee72ad131f6e783ee2c8271724d5b1" }, "downloads": -1, "filename": "ut2d-0.3.2.tar.gz", "has_sig": false, "md5_digest": "657dbfe798d683c69b116179d868f31b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7823, "upload_time": "2019-03-18T04:55:19", "url": "https://files.pythonhosted.org/packages/69/3e/ff98b9e1194135d832245ec9eaed57f96ee09e94525181177e92dfb8fe89/ut2d-0.3.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "657dbfe798d683c69b116179d868f31b", "sha256": "efe00109829b90445d83b4f0a32dc0446aee72ad131f6e783ee2c8271724d5b1" }, "downloads": -1, "filename": "ut2d-0.3.2.tar.gz", "has_sig": false, "md5_digest": "657dbfe798d683c69b116179d868f31b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7823, "upload_time": "2019-03-18T04:55:19", "url": "https://files.pythonhosted.org/packages/69/3e/ff98b9e1194135d832245ec9eaed57f96ee09e94525181177e92dfb8fe89/ut2d-0.3.2.tar.gz" } ] }