scan_httpdate(3)

πŸ“¦
version 0.34 Β· 2 versions
  • 0.34 Β· alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking (latest)
  • 0.30 Β· fedora 43, fedora 44, ubuntu jammy
, in alpine 3.24, debian bookworm, debian trixie, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– scan_httpdate β€” ok so bestie, let's talk HTTP dates πŸ’–

a page from the Library Functions Manual πŸŽ€ (yes that's the manual name, we're fancy here)


✨ NAME ✨

scan_httpdate β€” parses a HTTP date 🌸 literally just that, she does one thing and she does it well πŸ’…


πŸ¦‹ SYNTAX πŸ¦‹

okay so first you gotta pull in the header, no cap:

#include <libowfat/scan.h>

size_t scan_httpdate(const char *src,time_t *dest);

🌈 DESCRIPTION 🌈

scan_httpdate takes a date β€” the kind of date that's defined in the HTTP standard, iykyk β€” and parses it straight into a time_t. 🫢

She hands you back the number of bytes she read from src. And if the parse goes wrong? you get 0. Zero bytes, zero vibes, parse error, periodt. πŸ’€

⚠️ heads up bestie: the only supported time zone is GMT. That's it. That's the whole list. Don't come at her with your EST or your +02:00, she's not doing it. πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘

  • fmt_httpdate(3) β€” the other half of the duo, the one who writes the dates while scan_httpdate reads them. main character energy from both of them fr fr ✨

and that's the whole page, babe 🌸 this one lives in the Library Functions Manual (that's the manual name, right at the top, iconic) and she's filed under scan_httpdate(3) β€” no version number, no date, just her name in the footer being mysterious and lowkey iconic. πŸ’– πŸŽ€ πŸ¦‹ 🌈 ⭐ πŸ’