tm.c File Reference

#include <config.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <ctype.h>
#include <isc/tm.h>
#include <isc/util.h>

Go to the source code of this file.

Defines

#define ALT_E   0x01
#define ALT_O   0x02
#define LEGAL_ALT(x)   { if (alt_format & ~(x)) return (0); }
#define TM_YEAR_BASE   1900

Functions

static int conv_num (const char **buf, int *dest, int llim, int ulim)
time_t isc_tm_timegm (struct tm *tm)
char * isc_tm_strptime (const char *buf, const char *fmt, struct tm *tm)

Variables

static const char * day [7]
static const char * abday [7]
static const char * mon [12]
static const char * abmon [12]
static const char * am_pm [2]


Define Documentation

#define ALT_E   0x01

Definition at line 67 of file tm.c.

Referenced by isc_tm_strptime().

#define ALT_O   0x02

Definition at line 68 of file tm.c.

Referenced by isc_tm_strptime().

#define LEGAL_ALT (  )     { if (alt_format & ~(x)) return (0); }

Definition at line 69 of file tm.c.

Referenced by isc_tm_strptime().

#define TM_YEAR_BASE   1900

Definition at line 72 of file tm.c.

Referenced by isc_tm_strptime().


Function Documentation

static int conv_num ( const char **  buf,
int *  dest,
int  llim,
int  ulim 
) [static]

Definition at line 95 of file tm.c.

Referenced by isc_tm_strptime().

time_t isc_tm_timegm ( struct tm *  tm  ) 

Definition at line 119 of file tm.c.

Referenced by isc_time_parsehttptimestamp().

char* isc_tm_strptime ( const char *  buf,
const char *  fmt,
struct tm *  tm 
)

Definition at line 144 of file tm.c.

References abday, abmon, ALT_E, ALT_O, am_pm, conv_num(), day, DE_CONST, isc_tm_strptime(), LEGAL_ALT, mon, REQUIRE, and TM_YEAR_BASE.

Referenced by isc_time_parsehttptimestamp(), and isc_tm_strptime().


Variable Documentation

const char* day[7] [static]

Initial value:

 {
        "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday",
        "Friday", "Saturday"
}

Definition at line 75 of file tm.c.

Referenced by dns_time64_fromtext(), and isc_tm_strptime().

const char* abday[7] [static]

Initial value:

 {
        "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"
}

Definition at line 79 of file tm.c.

Referenced by isc_tm_strptime().

const char* mon[12] [static]

Initial value:

 {
        "January", "February", "March", "April", "May", "June", "July",
        "August", "September", "October", "November", "December"
}

Definition at line 82 of file tm.c.

Referenced by isc_tm_strptime().

const char* abmon[12] [static]

Initial value:

 {
        "Jan", "Feb", "Mar", "Apr", "May", "Jun",
        "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"
}

Definition at line 86 of file tm.c.

Referenced by isc_tm_strptime().

const char* am_pm[2] [static]

Initial value:

 {
        "AM", "PM"
}

Definition at line 90 of file tm.c.

Referenced by isc_tm_strptime().


Generated on Tue Apr 28 17:41:18 2015 by Doxygen 1.5.4 for BIND9 Internals 9.11.0pre-alpha