Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change expiration date properly #213

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Conversation

mattiasdrp
Copy link
Contributor

@mattiasdrp mattiasdrp commented Mar 18, 2022

I mistakenly wrote 55*10 instead of 60*8 since it's not 55 minutes instead of 60 but 8 minutes instead of 10

A safe way would be, if you want me to try it, to

date && curl -I https://api.github.com | grep -Fi "date"

Read the two dates, compute the difference in time and create the expected expiration date for the token accordingly. This way, it doesn't matter if your computer is way out of sync, you'll always be able to provide GitHub with the proper dates.

I mistakenly wrote 55*10 instead of 60*8 since it's not 55 minutes instead of 60 but 8 minutes instead of 10

A safe way would be, if you want me to try it, to 

> date && curl -I https://api.github.com | grep -Fi "date"

Read the two dates, compute the difference in time and create the expected expiration date for the token accordingly. This way, it doesn't matter if your computer is way out of sync, you'll always be able to provide GitHub with the proper dates.
Copy link
Member

@Zimmi48 Zimmi48 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this change is fine. Why is this marked as draft?

@mattiasdrp
Copy link
Contributor Author

Why is this marked as draft?

Because of the second part:

A safe way would be, if you want me to try it, to

date && curl -I https://api.github.com | grep -Fi "date"

Read the two dates, compute the difference in time and create the expected expiration date for the token accordingly. This way, it doesn't matter if your computer is way out of sync, you'll always be able to provide GitHub with the proper dates.

@Zimmi48
Copy link
Member

Zimmi48 commented Apr 5, 2022

The proposal in the second part looks fine to me as well (though would it be possible to do it entirely on the OCaml side instead of calling external commands?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants