{ "info": { "author": "Johan von Forstner", "author_email": "forstner@physik.uni-kiel.de", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# `time_converter` [![build status](https://gitlab.physik.uni-kiel.de/ET/time_converter/badges/master/build.svg)](https://gitlab.physik.uni-kiel.de/ET/time_converter/commits/master) [![coverage report](https://gitlab.physik.uni-kiel.de/ET/time_converter/badges/master/coverage.svg)](http://et.page.physik.uni-kiel.de/time_converter/coverage/)\n\nA Python class that allows for convenient conversion between different date and time formats and units.\nThe library supports both general-purpose Earth-based time units (such as Python's `datetime` type, Day-of-year or\nPOSIX time) as well as time units useful for working with data from the Mars Science Laboratory and Chang'e 4 space\nmissions. It can be easily extended to support additional units.\n\n## Installation\n```python\npip3 install time_converter\n```\n\nYes, it's that simple.\n\n## Usage\n```python\nfrom time_converter import Time\n\nTime(2019.5, 'decimalyear').to('dt')\n# > datetime.datetime(2019, 7, 2, 12, 0)\n```\n\nyou can also supply list-like objects as input, the output will be a `numpy` array.\n```python\nTime([2018.0, 2018.1], 'decimalyear').to('dt')\n# > array([datetime.datetime(2019, 1, 1, 0, 0),\n# datetime.datetime(2019, 2, 6, 11, 59, 59, 999997)], dtype=object)\n```\n\n## Supported units\n\n### Earth-based time units\n\n| Unit | Example | Name | Abbreviated Name |\n|-------------------------------|---------------------------------------|---------------|------------------|\n| Python datetime (UTC) | `datetime.datetime(2019, 1, 1, 0, 0)` | `datetime` | `dt` |\n| DoY Tuple (year, day of year) | `(2019, 1.0)` | `doy` | |\n| Decimal year | `2019.0` | `decimalyear` | `dy` |\n| POSIX time | `1546300800` | `posix` | |\n\n### Mars Science Laboratory\n\nThe MSL spacecraft clock (`sclk`) measures the number of seconds since January 1 2000, 11:58:55.816 UTC. However, due to\ndrifting of the clock, some corrections need to be applied based on\n[files supplied by NASA](https://naif.jpl.nasa.gov/pub/naif/pds/data/msl-m-spice-6-v1.0/mslsp_1000/data/sclk/sclkinfo.txt),\nwhich this tool uses to do the conversion between `sclk` and other units.\n\n| Unit | Example | Name |\n|----------------------|----------------------|--------|\n| MSL mission sol | `2276.8306983767375` | `sol` |\n| MSL spacecraft clock | `599570768.5720837` | `sclk` |\n\n### Chang'E 4\n\nFor Chang'E 4, the conversion of spacecraft clock time to datetime has already implemented, so it does not need to be\nincluded in time_converter. But we have implemented a converter for the lunar day number and local solar time at\nChang'E 4's landing site:\n\n| Unit | Example | Name |\n|--------------------------------|-------------------------------|------------|\n| Local solar time at Chang'E 4 | `1, datetime.time(7, 32, 30)` | `ce4lst` |", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://gitlab.physik.uni-kiel.de/ET/time_converter", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "time-converter", "package_url": "https://pypi.org/project/time-converter/", "platform": "", "project_url": "https://pypi.org/project/time-converter/", "project_urls": { "Homepage": "https://gitlab.physik.uni-kiel.de/ET/time_converter" }, "release_url": "https://pypi.org/project/time-converter/1.2.3/", "requires_dist": null, "requires_python": "", "summary": "A Python class that allows for convenient conversion between different date and time formats/units", "version": "1.2.3" }, "last_serial": 5791180, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "ef76ebf4d6266a505cfd12e5d3be52fd", "sha256": "2c6e3cbc9ea5f86afe60a40ba1372d5077aac310ff281e39013a553315fbd420" }, "downloads": -1, "filename": "time_converter-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "ef76ebf4d6266a505cfd12e5d3be52fd", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9360, "upload_time": "2019-01-21T13:16:04", "url": "https://files.pythonhosted.org/packages/e8/bf/53b923ab8aa0bcfcdb49471aa5640158bd9eab972ec1411ef1ecb84b0cd7/time_converter-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f9d75b499a3d8883fff09f64044ca6cd", "sha256": "3d3f8115f46d5c841183ab37e440dc06be4803789744f8a21e723422a28b1370" }, "downloads": -1, "filename": "time_converter-1.0.0.tar.gz", "has_sig": false, "md5_digest": "f9d75b499a3d8883fff09f64044ca6cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5601, "upload_time": "2019-01-21T13:16:06", "url": "https://files.pythonhosted.org/packages/bd/4f/ae858915b04383997818ac18a0c7800fb81ffbcb9b287b947690e355e4ec/time_converter-1.0.0.tar.gz" } ], "1.1.0": [ { "comment_text": "", "digests": { "md5": "d93ce9af9d49e88d7ea72dd9360467f4", "sha256": "d93509958be3ee61ffa2a795cab996ab777ad36123ad42c6db02c3fe6640e1a2" }, "downloads": -1, "filename": "time_converter-1.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "d93ce9af9d49e88d7ea72dd9360467f4", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 10158, "upload_time": "2019-07-09T11:22:17", "url": "https://files.pythonhosted.org/packages/62/65/ec835f7070fb4105149b7f40e0704c3fe446c5ec9638d0b95e3c0385b1c1/time_converter-1.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4814385f96f360bfa1f1909581696155", "sha256": "8c1c566ee1bd1ac27205556fde309c6d503e0d6141931571ac5b307ebfaf1970" }, "downloads": -1, "filename": "time_converter-1.1.0.tar.gz", "has_sig": false, "md5_digest": "4814385f96f360bfa1f1909581696155", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7255, "upload_time": "2019-07-09T11:22:19", "url": "https://files.pythonhosted.org/packages/39/28/abec0705709bed9ad281755c1ad3acc7dddd3c501eac3be07768dd07d84a/time_converter-1.1.0.tar.gz" } ], "1.1.1": [ { "comment_text": "", "digests": { "md5": "223de4cc72327be7c1608ce87e0f3da6", "sha256": "7150dd823438880231f2b09c7cc8526d7f2ba0346252269e2de4da194328671b" }, "downloads": -1, "filename": "time_converter-1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "223de4cc72327be7c1608ce87e0f3da6", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 325848, "upload_time": "2019-07-10T10:12:52", "url": "https://files.pythonhosted.org/packages/80/9e/554c56322eb32a59900ff97faa1f3626522a6c5f2e9e3630e38a9cd009fa/time_converter-1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d448ae0382ea15eab8562c1cc7677bfa", "sha256": "897006b3980f8ad233faed3f3c383efedba39cd737d9866b0ddd6e997a2cc56e" }, "downloads": -1, "filename": "time_converter-1.1.1.tar.gz", "has_sig": false, "md5_digest": "d448ae0382ea15eab8562c1cc7677bfa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 325622, "upload_time": "2019-07-10T10:12:54", "url": "https://files.pythonhosted.org/packages/95/54/0f9cf3b6eaa43449e3fb9a4218850286835e61267f8a8277ad691bbe94ee/time_converter-1.1.1.tar.gz" } ], "1.1.2": [ { "comment_text": "", "digests": { "md5": "0a135369330856cd997f0374b67c8239", "sha256": "f7db2578359ba9b040e8065e978aca9bacfb80b343c2f47cb718dcbafd63b342" }, "downloads": -1, "filename": "time_converter-1.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "0a135369330856cd997f0374b67c8239", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 325859, "upload_time": "2019-07-10T10:24:55", "url": "https://files.pythonhosted.org/packages/ff/7d/69fb0482bebac8bb66f5e26c9fc589f26b54363392e34cc6c773be525fc4/time_converter-1.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "026107e10af6e8cf73331b8b3c2f1c8b", "sha256": "88ee6d3a3c01752c98897b5b39d97260b2a8396d0ee9e9b39cd4f2028c497ed2" }, "downloads": -1, "filename": "time_converter-1.1.2.tar.gz", "has_sig": false, "md5_digest": "026107e10af6e8cf73331b8b3c2f1c8b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 325637, "upload_time": "2019-07-10T10:24:57", "url": "https://files.pythonhosted.org/packages/21/2b/80f9a04915afff6ceaa150248b352d86fd0613f86699e7b6c46c430767f2/time_converter-1.1.2.tar.gz" } ], "1.1.3": [ { "comment_text": "", "digests": { "md5": "fb3995410bbb11849cdfb5a32f0647a0", "sha256": "9a2729fb86df7021ba731b282636e15619db522e4207e6cbe113f718afceaa53" }, "downloads": -1, "filename": "time_converter-1.1.3-py3-none-any.whl", "has_sig": false, "md5_digest": "fb3995410bbb11849cdfb5a32f0647a0", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 328542, "upload_time": "2019-07-10T10:40:03", "url": "https://files.pythonhosted.org/packages/4a/d7/7844b8a4f89a7b203f21ff8390a3b3288077cc83a2fc23ae53f4c50c6f4a/time_converter-1.1.3-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "138089e855df6bb9bf33efeb06263461", "sha256": "e47756256c3df97a0d3aa024c03c3638a19f01bfeee3109fcdf61e70efab1308" }, "downloads": -1, "filename": "time_converter-1.1.3.tar.gz", "has_sig": false, "md5_digest": "138089e855df6bb9bf33efeb06263461", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 328556, "upload_time": "2019-07-10T10:40:05", "url": "https://files.pythonhosted.org/packages/fa/fb/e06b9e307a7b5b1ec6c4d8c8affaa2d990bc8ef1cdd9d90fd1c36b0a999c/time_converter-1.1.3.tar.gz" } ], "1.1.4": [ { "comment_text": "", "digests": { "md5": "cd34ac88bed9b10d9a1aea7bb88dfa8b", "sha256": "b84202b2563456b1a3fbf93860867f65f093624698447f4ef25de4536cce5c78" }, "downloads": -1, "filename": "time_converter-1.1.4-py3-none-any.whl", "has_sig": false, "md5_digest": "cd34ac88bed9b10d9a1aea7bb88dfa8b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 328576, "upload_time": "2019-07-12T08:16:25", "url": "https://files.pythonhosted.org/packages/d0/8d/4a9ecca0dd47c940cd907dd8daa4e1caa323082893f8040cc5e53f20632b/time_converter-1.1.4-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3534e2c0fddf2a0ed238bb924d895367", "sha256": "f506a03cd7f928d929cfc8abd410a02d459c55c05a3a3a79f50e168a6c48d7a7" }, "downloads": -1, "filename": "time_converter-1.1.4.tar.gz", "has_sig": false, "md5_digest": "3534e2c0fddf2a0ed238bb924d895367", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 328582, "upload_time": "2019-07-12T08:16:27", "url": "https://files.pythonhosted.org/packages/36/97/bbf6407f8dcdd31c42798bdb47b17398c855ac71abebef76478478940021/time_converter-1.1.4.tar.gz" } ], "1.2.0": [ { "comment_text": "", "digests": { "md5": "832df29557dda0102c1b355a1eac61b5", "sha256": "6a358929b782acc102ef1b3c48a7cf3ae0e7d7395a49501d3e1ef44ca3a1fb12" }, "downloads": -1, "filename": "time_converter-1.2.0.tar.gz", "has_sig": false, "md5_digest": "832df29557dda0102c1b355a1eac61b5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 329955, "upload_time": "2019-09-05T12:26:46", "url": "https://files.pythonhosted.org/packages/b7/f2/59c9510ce90a4886560030c03971a1c1a01fd380ffabde4f8caf4dfbe158/time_converter-1.2.0.tar.gz" } ], "1.2.1": [ { "comment_text": "", "digests": { "md5": "7ecb048fecad688fd9b4bc082dae7482", "sha256": "3e151798f57c813a10ff46826d89fd8e33a5da13e915c424452844f2233c9d68" }, "downloads": -1, "filename": "time_converter-1.2.1.tar.gz", "has_sig": false, "md5_digest": "7ecb048fecad688fd9b4bc082dae7482", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330350, "upload_time": "2019-09-06T09:05:10", "url": "https://files.pythonhosted.org/packages/4a/4a/93a217669c06a3755fd9e1ba2b3f6d6cba45048d307cac08c3c0cf7a5adc/time_converter-1.2.1.tar.gz" } ], "1.2.2": [ { "comment_text": "", "digests": { "md5": "010ae6d14c0ee9d7d3835cf52f116a4c", "sha256": "06f85e6b78e6a74e7a13deed8f4d06fe05a3953b3a7875187e7aa6a462f03fd5" }, "downloads": -1, "filename": "time_converter-1.2.2.tar.gz", "has_sig": false, "md5_digest": "010ae6d14c0ee9d7d3835cf52f116a4c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330359, "upload_time": "2019-09-06T09:13:31", "url": "https://files.pythonhosted.org/packages/01/3a/cac64690c7a9e5ace78f50b06e90cadbdf900655feb3be1ceb516eecf9dd/time_converter-1.2.2.tar.gz" } ], "1.2.3": [ { "comment_text": "", "digests": { "md5": "84afab7b9bcfe7c07bc8671c774826c9", "sha256": "353ab873e8e939b392b8bd2368e2cfa79c250133b302d89afd6bedf75aed6d7d" }, "downloads": -1, "filename": "time_converter-1.2.3.tar.gz", "has_sig": false, "md5_digest": "84afab7b9bcfe7c07bc8671c774826c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330379, "upload_time": "2019-09-06T09:21:18", "url": "https://files.pythonhosted.org/packages/4e/35/e8cf536947de640365e73fa84074771f8f2c6ce9209ce0e25bba8ae25e58/time_converter-1.2.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "84afab7b9bcfe7c07bc8671c774826c9", "sha256": "353ab873e8e939b392b8bd2368e2cfa79c250133b302d89afd6bedf75aed6d7d" }, "downloads": -1, "filename": "time_converter-1.2.3.tar.gz", "has_sig": false, "md5_digest": "84afab7b9bcfe7c07bc8671c774826c9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 330379, "upload_time": "2019-09-06T09:21:18", "url": "https://files.pythonhosted.org/packages/4e/35/e8cf536947de640365e73fa84074771f8f2c6ce9209ce0e25bba8ae25e58/time_converter-1.2.3.tar.gz" } ] }