I wanted to get the date on which a github repository is created. However the date which I am getting is not corrrect, for example the repo https://github.com/pandas-dev/pandas/, the intial commit date is 31 Jul 2009, however it is shown as 2010-08-24 by the api.
Following is the code that I have used.
from ghapi.all import GhApi
from configparser import ConfigParser
Hi All,
I wanted to get the date on which a github repository is created. However the date which I am getting is not corrrect, for example the repo https://github.com/pandas-dev/pandas/, the intial commit date is 31 Jul 2009, however it is shown as 2010-08-24 by the api.
Following is the code that I have used.
from ghapi.all import GhApi from configparser import ConfigParser
config_parser = ConfigParser() config_parser.read("config.ini") access_token = config_parser["public"].get("access_token")
gh = GhApi(owner="pandas-dev", repo="pandas", token=access_token)
y = gh.repos.get(owner="pandas-dev", repo="pandas")
print(f"Creation date = {y['created_at']}")
The output is:
Creation date = 2010-08-24T01:37:33Z
This creation date is not correct, please let me know how to fetch the correct creation date of the Github repo or date of the intial commit.
Thanks