curl / Mailing Lists / curl-library / Single Mail


Unknown system time | feature discussion

From: Hagemann Laurin <>
Date: Wed, 25 Jul 2018 11:42:49 +0000


A little bit of background:
I'm developing some embedded stuff and system time is always reset on reboot, so time() will return 0 + seconds since boot. (changing the system time on runtime is not an option)
If I'm not mistaken, this is a problem not only for cookie expiry but also to detect expired certificates.

My plan is to replace all time() calls by a data->set.curl_time function pointer, which defaults to time(), but can be overriden by the user.
Would such an approach be accepted into the upstream?

Best regards,

Laurin Hagemann
Software Engineer GmbH

Despag-Str. 4a, 85055 Ingolstadt, Germany
Registered Office:
Despag-Str. 4a, 85055 Ingolstadt, Germany

Phone +49-8458-3332-1248 GmbH
Managing Directors Uwe Reder, Dr. Riclef Schmidt-Clausen
Register Court Ingolstadt HRB 5221

Received on 2018-07-25