Skip to content

Commit 75397e8

Browse files
author
Georg Weisert
committed
use seconds_from_now instead of from_period in asn1 time methods
1 parent d7a8f3f commit 75397e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

openssl/src/asn1.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -322,17 +322,17 @@ impl Asn1Time {
322322

323323
/// Creates a new time with the current time
324324
pub fn now() -> Result<Asn1Time, ErrorStack> {
325-
Asn1Time::from_period(0)
325+
Asn1Time::seconds_from_now(0)
326326
}
327327

328328
/// Creates a new time on specified interval in days from now
329329
pub fn days_from_now(days: u32) -> Result<Asn1Time, ErrorStack> {
330-
Asn1Time::from_period(days as c_long * 60 * 60 * 24)
330+
Asn1Time::seconds_from_now(days as c_long * 60 * 60 * 24)
331331
}
332332

333333
/// Creates a new time on specified interval in seconds from now
334334
pub fn seconds_from_now(seconds: c_long) -> Result<Asn1Time, ErrorStack> {
335-
Self::from_period(seconds)
335+
Asn1Time::from_period(seconds)
336336
}
337337

338338
/// Creates a new time from the specified `time_t` value

0 commit comments

Comments
 (0)