rfc1123.cc File Reference
#include "squid.h"
#include "time/gadgets.h"
#include <cctype>
#include <cstring>
#include <ctime>
Include dependency graph for rfc1123.cc:

Go to the source code of this file.

Macros

#define RFC850_STRFTIME   "%A, %d-%b-%y %H:%M:%S GMT"
 
#define RFC1123_STRFTIME   "%a, %d %b %Y %H:%M:%S GMT"
 

Functions

static int make_month (const char *s)
 
static int make_num (const char *s)
 
static int tmSaneValues (struct tm *tm)
 
static struct tm * parse_date_elements (const char *day, const char *month, const char *year, const char *aTime, const char *zone)
 
static struct tm * parse_date (const char *str)
 

Variables

static const char * month_names [12]
 

Macro Definition Documentation

◆ RFC1123_STRFTIME

#define RFC1123_STRFTIME   "%a, %d %b %Y %H:%M:%S GMT"

Definition at line 21 of file rfc1123.cc.

◆ RFC850_STRFTIME

#define RFC850_STRFTIME   "%A, %d-%b-%y %H:%M:%S GMT"

Definition at line 20 of file rfc1123.cc.

Function Documentation

◆ make_month()

static int make_month ( const char *  s)
static

Definition at line 41 of file rfc1123.cc.

References month_names, xtolower, and xtoupper.

Referenced by parse_date_elements().

◆ make_num()

static int make_num ( const char *  s)
static

Definition at line 32 of file rfc1123.cc.

Referenced by parse_date_elements().

◆ parse_date()

static struct tm * parse_date ( const char *  str)
static

Definition at line 105 of file rfc1123.cc.

References parse_date_elements(), xisdigit, and xstrncpy().

Referenced by Time::ParseRfc1123().

◆ parse_date_elements()

static struct tm * parse_date_elements ( const char *  day,
const char *  month,
const char *  year,
const char *  aTime,
const char *  zone 
)
static

Definition at line 73 of file rfc1123.cc.

References make_month(), make_num(), and tmSaneValues().

Referenced by parse_date().

◆ tmSaneValues()

static int tmSaneValues ( struct tm *  tm)
static

Definition at line 57 of file rfc1123.cc.

Referenced by parse_date_elements().

Variable Documentation

◆ month_names

const char* month_names[12]
static
Initial value:
= {
"Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
}

Definition at line 26 of file rfc1123.cc.

Referenced by make_month().

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors