{"id":22294991,"url":"https://github.com/buscedv/pyepoch","last_synced_at":"2025-03-25T22:22:11.277Z","repository":{"id":117858391,"uuid":"156680919","full_name":"Buscedv/PyEpoch","owner":"Buscedv","description":"PyEpoch is aPython module that can convert timezones, set time and calculate seconds since the UNIX epoch","archived":false,"fork":false,"pushed_at":"2020-04-09T19:56:34.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-30T19:42:23.530Z","etag":null,"topics":["converter","date","datetime","epoch","module","python","time","timezone","timezones"],"latest_commit_sha":null,"homepage":"https://buscedv.github.io/PyEpoch","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Buscedv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-08T09:19:14.000Z","updated_at":"2020-04-09T19:56:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"0511b9ff-58e8-49cb-b87a-3b9d541dd8fc","html_url":"https://github.com/Buscedv/PyEpoch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Buscedv%2FPyEpoch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Buscedv%2FPyEpoch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Buscedv%2FPyEpoch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Buscedv%2FPyEpoch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Buscedv","download_url":"https://codeload.github.com/Buscedv/PyEpoch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245550920,"owners_count":20633941,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["converter","date","datetime","epoch","module","python","time","timezone","timezones"],"created_at":"2024-12-03T17:39:58.357Z","updated_at":"2025-03-25T22:22:11.254Z","avatar_url":"https://github.com/Buscedv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PyEpoch\nA Python module that converts timezones, sets time and calculates the number of seconds since the UNIX epoch.\n\n\n# Installation\n\nDownload the epoch.py file and then import it into your python project.\n\n```python\nimport pyepoch\n```\n\n\u003cbr\u003e\n\n# Basic usage\n\nHow to use PyEpoch.\n\n```python\n# Gets today's date.\ntoday = pyepoch.today()\n```\n\n\u003cbr\u003e\n\n# Documentation\n\n## Today()\n\n### The today() function\nReturns today's date using _datetime.datetime_\n\n### Ex.\n\n```python\n# Gets today's date.\ntoday = pyepoch.today()\n\u003e\u003e\u003e 2018, 11, 8, 11, 32, 59, 744692\n```\n\n\u003cbr\u003e\n\n## Epoch_Sec()\n\n\n### The epoch_sec() function\nReturns the number of seconds passed up to a specific date since the Unix epoch.\nThe function takes two parameters:\n\u003cbr\u003e\n- A date: a datetime object\n- A timezone: a timezone string, ex. 'US/Pacific'\n\n### Ex.\n\n```python\n# Gets today's date.\ntoday = pyepoch.today()\n# Seconds up to today since the Unix epoch.\ntoday = pyepoch.epoch_sec(today, 'US/Pacific')\n\u003e\u003e\u003e 2018, 11, 8, 11, 32, 59, 744692-08:00\n```\n\n\n\n## Timezone_Set()\n\n\n### The timezone_set() function\nReturns a passed in time into another timezone (also passed in) and sets the hour/minute/second in the passed in date.\nThe function takes five parameters:\u003cbr\u003e\n- A date: a datetime object to be converted.\n- A timezone: a timezone string, ex. 'US/Pacific'\n- Hour int\n- Minute int\n- Second int\n\n\n### Ex.\n\n```python\n# Gets today's date.\ntoday = pyepoch.today()\n# Midnight pacific time today.\ntoday = pyepoch.timezone(today, 'US/Pacific', 0, 0, 0)\n\u003e\u003e\u003e 2018-11-08 08:00:00-08:00\n```\n\n# Examples\n\nYou can download the 'example.py' file to see the functions in action.\n\n# Contact\nGitHub: \u003ca href=\"https://github.com/buscedv\" traget=\"blank\"\u003e@Buscedv\u003c/a\u003e\n\u003cbr\u003e\u003cbr\u003e\nEdvard Busck-Nielsen 2020\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuscedv%2Fpyepoch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbuscedv%2Fpyepoch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbuscedv%2Fpyepoch/lists"}