OPENSSL_gmtime(3) | OpenSSL | OPENSSL_gmtime(3) |
#include <openssl/crypto.h> struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result); int OPENSSL_gmtime_adj(struct tm *tm, int offset_day, long offset_sec); int OPENSSL_gmtime_diff(int *pday, int *psec, const struct tm *from, const struct tm *to);
OPENSSL_gmtime_adj() adds the offsets in offset_day and offset_sec to tm.
OPENSSL_gmtime_diff() calculates the difference between from and to.
OPENSSL_gmtime_adj() converts tm into a days and seconds value, adds the offsets, then converts back into a struct tm specified by tm. Leap seconds are not considered.
OPENSSL_gmtime_diff() calculates the difference between the two struct tm structures from and to. The difference in days is placed into *pday, the remaining seconds are placed to *psec. The value in *psec will be less than the number of seconds per day (3600). Leap seconds are not considered.
OPENSSL_gmtime_adj() and OPENSSL_gmtime_diff() return 0 on error, and 1 on success.
Licensed under the Apache License 2.0 (the "License"). You may not use this file except in compliance with the License. You can obtain a copy in the file LICENSE in the source distribution or at <https://www.openssl.org/source/license.html>.
2023-05-07 | 3.0.12 |