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

Use UTC for not_before and not_after #56

Open
reedloden opened this issue Aug 9, 2013 · 1 comment
Open

Use UTC for not_before and not_after #56

reedloden opened this issue Aug 9, 2013 · 1 comment

Comments

@reedloden
Copy link

In my experience, time zones generally just cause problems for certificates, so let's use UTC by default for not_before and not_after. Also, I've found it useful to round such values to the nearest previous hour, capping minute and second to 0.

This is an example of how I currently do it:

not_before = Time.now.change(:min => 0).utc.to_i
not_after = Time.now.change(:min => 0).utc.to_i + 2.years
@reaperhulk
Copy link
Member

So at the moment when you do assignment of not_before or not_after it should convert whatever's provided directly into UTC. Is this not what you want?

I don't want to round validity periods in r509's primary signer (one of its design goals is to still allow low level behaviors for my own testing purposes), but it might make sense to start trying to spec out a "friendly signer" that does some of this behavior (such as #59 )

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

No branches or pull requests

2 participants