{ "info": { "author": "Belavin Denis", "author_email": "belavin.d.andreevich@yandex.ru", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "intimezone\n==========\n\n.. image:: https://img.shields.io/badge/python-2%20%7C%203-ffc30f.svg\n :target: https://github.com/LuckyDenis/tzintime/\n\n.. image:: https://img.shields.io/badge/license-MIT-ffc30f.svg\n :target: https://github.com/LuckyDenis/tzintime/blob/v1.0.0/LICENSE\n\n.. image:: https://img.shields.io/badge/platform-win32/64%20%7C%20linux32/64-ffc30f.svg\n :target: https://github.com/LuckyDenis/tzintime/\n\n.. image:: https://img.shields.io/badge/pypi-v1.0.1-ffc30f.svg\n :target: https://pypi.org/project/intimezone/\n\n.. image:: https://travis-ci.org/LuckyDenis/tzintime.svg?branch=master\n :target: https://travis-ci.org/LuckyDenis/tzintime/\n\n-----\n\n**Introduction**\n\nThis package is based on the library ``pytz``. Provides an interface, converting naive and localized time to another time zone. You can choose how the new time zone will be added - it will be added directly on the date itself or displayed separately (examples will be discussed below). You can also specify a date output template. Templates need to be configured according to the `datetime `_ library's templates table.\n\n-----\n\n**Installation**\n\n.. code-block:: python\n\n python -m pip install intimezone\n\n-----\n\n**Example & Usage**\n\nThis library supports only two methods of conversion. The first is ``flag='convert'`` (``flag=None``) adds a timezone to the base date. The second ``flag='localize'`` adds the time zone separately.\n\n*Test dataset:*\n\n.. code-block:: python\n\n >>> from intimezone import convert\n >>> ntime = 1545695999 # naive time\n >>> ltime = 1545695999.5219207 # localized time\n\n*Default settings:*\n\n.. code-block:: python\n\n >>> convert(ntime) # naive time\n 'Mon, 24 Dec 2018 23:59:59'\n >>> convert(ltime) # localized time\n 'Mon, 24 Dec 2018 23:59:59'\n\n*The values flag='convert':*\n\n.. code-block:: python\n\n >>> convert(ntime, tz='Europe/Madrid', flag='convert') # naive time\n 'Tue, 25 Dec 2018 00:59:59'\n >>> convert(ltime, tz='Europe/Madrid', flag='convert') # localized time\n 'Tue, 25 Dec 2018 00:59:59'\n\n*The values flag='localize':*\n\n.. code-block:: python\n\n >>> convert(ntime, tz='Europe/Madrid', flag='localize') # naive time\n 'Mon, 24 Dec 2018 23:59:59 +0100(CET)'\n >>> convert(ltime, tz='Europe/Madrid', flag='localize') # localized time\n 'Mon, 24 Dec 2018 23:59:59 +0100(CET)'\n\n*Custom template for date:*\n\n.. code-block:: python\n\n >>> convert(ntime, tz='Europe/Madrid', f='%D - %H:%M:%S') # naive time\n '12/25/18 - 00:59:59'\n >>> convert(ltime, tz='Europe/Madrid', f='%D - %H:%M:%S') # localized time\n '12/25/18 - 00:59:59'\n\n-----\n\n**Options**\n\n* The library provides a single interface. In order to select in which mode to get the date, the ``flag`` (``None``/``'convert'`` or ``'localize'``) option is used.\n\n* The parameter ``moment_time`` can take unix time in the format ``int`` or ``float``. Represents moment-time.\n\n* The time zone ``tz`` is specified in the format ``'Region/City'``, ``'Etc/GMT\u00b112'``.\n\n* ``f`` is responsible for generating a line at the output, through this parameter you can set a template in the style of templates of the standard library `datetime `_.\n\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/LuckyDenis/tzintime", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "intimezone", "package_url": "https://pypi.org/project/intimezone/", "platform": "any", "project_url": "https://pypi.org/project/intimezone/", "project_urls": { "Homepage": "https://github.com/LuckyDenis/tzintime" }, "release_url": "https://pypi.org/project/intimezone/1.0.2/", "requires_dist": [ "pytz (>=2018.5)" ], "requires_python": "", "summary": "Converts the UTC time, the date and time of the region.", "version": "1.0.2" }, "last_serial": 4256418, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0c59685fd809c86f54df85e744866254", "sha256": "70cac19935f18e10419100f1fc9340ee8e2ce79c0fb1f24e0a35d01a99dc440a" }, "downloads": -1, "filename": "intimezone-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0c59685fd809c86f54df85e744866254", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5558, "upload_time": "2018-09-10T04:49:37", "url": "https://files.pythonhosted.org/packages/bf/02/efd5493868ca9caf7837556e00eb3085e87baf22cfe68745801c094e00b0/intimezone-1.0.0-py2.py3-none-any.whl" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "ea61fd3379f29c4536c5b38d7c3ac1a4", "sha256": "58059716697416286871b93723e6b6742998b5464ce24beed9f4ab4be31deeb0" }, "downloads": -1, "filename": "intimezone-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "ea61fd3379f29c4536c5b38d7c3ac1a4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5539, "upload_time": "2018-09-10T05:26:56", "url": "https://files.pythonhosted.org/packages/9b/8c/e85580315b6dfdac377f92e63867c5dba40e7bbcc23fbf17ec4406cba00f/intimezone-1.0.1-py2.py3-none-any.whl" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "f800074493e1037d54b4261ca71f0ac1", "sha256": "9060d4efc6564e3b5e854e9ccfee7bbd57a5939b7702d4b67d32fdf9253fb271" }, "downloads": -1, "filename": "intimezone-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f800074493e1037d54b4261ca71f0ac1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5553, "upload_time": "2018-09-10T06:03:48", "url": "https://files.pythonhosted.org/packages/90/3a/0700249d6552a385f6d93e99eb59baa53490ecf5223151e086b32fdc6b1d/intimezone-1.0.2-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f800074493e1037d54b4261ca71f0ac1", "sha256": "9060d4efc6564e3b5e854e9ccfee7bbd57a5939b7702d4b67d32fdf9253fb271" }, "downloads": -1, "filename": "intimezone-1.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f800074493e1037d54b4261ca71f0ac1", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5553, "upload_time": "2018-09-10T06:03:48", "url": "https://files.pythonhosted.org/packages/90/3a/0700249d6552a385f6d93e99eb59baa53490ecf5223151e086b32fdc6b1d/intimezone-1.0.2-py2.py3-none-any.whl" } ] }