| 2991 | } |
| 2992 | |
| 2993 | char *formatHttpDate(const time_t t) { |
| 2994 | static char buf[40]; |
| 2995 | struct tm *timeinfo; |
| 2996 | timeinfo = localtime(&t); // Get the local time |
| 2997 | const time_t utcTime = mktime(timeinfo); // Convert to UTC |
| 2998 | timeinfo = gmtime(&utcTime); |
| 2999 | strftime(buf, sizeof(buf), "%a, %d %b %Y %H:%M:%S GMT", timeinfo); |
| 3000 | return buf; |
| 3001 | } |
| 3002 | |
| 3003 | String urlEncode(const char *msg) { |
| 3004 | constexpr const char *hex = "0123456789ABCDEF"; |
no outgoing calls
no test coverage detected