30static const char *
const mon_short_names[] = {
31 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
34static const char *
const day_short_names[] = {
35 "Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
42 struct tm *tm1, tmbuf;
53 snprintf(str, 80,
"%s, %02d %s %04d %02d:%02d:%02d GMT",
54 day_short_names[tm1->tm_wday],
56 mon_short_names[tm1->tm_mon],
58 tm1->tm_hour, tm1->tm_min, tm1->tm_sec);
66#ifndef HAVE_DECL_STRPTIME
67char *
strptime(
const char *
s,
const char *format,
struct tm *tm);
77 struct tm parsed_time;
87 unparsed_part =
strptime(ts, format, &parsed_time);
88 if (unparsed_part ==
NULL) {
93 add_assoc_long(
return_value,
"tm_sec", parsed_time.tm_sec);
94 add_assoc_long(
return_value,
"tm_min", parsed_time.tm_min);
95 add_assoc_long(
return_value,
"tm_hour", parsed_time.tm_hour);
96 add_assoc_long(
return_value,
"tm_mday", parsed_time.tm_mday);
97 add_assoc_long(
return_value,
"tm_mon", parsed_time.tm_mon);
98 add_assoc_long(
return_value,
"tm_year", parsed_time.tm_year);
99 add_assoc_long(
return_value,
"tm_wday", parsed_time.tm_wday);
100 add_assoc_long(
return_value,
"tm_yday", parsed_time.tm_yday);
101 add_assoc_string(
return_value,
"unparsed", unparsed_part);
sizeof(Countable|array $value, int $mode=COUNT_NORMAL)
strptime(string $timestamp, string $format)
PHPAPI char * php_std_date(time_t t)
memset(ptr, 0, type->size)
foreach($dp as $el) foreach( $dp as $el) if( $pass2< 2) echo ""
PHPAPI struct tm * php_gmtime_r(const time_t *const timep, struct tm *p_tm)
#define ZEND_PARSE_PARAMETERS_END()
#define Z_PARAM_STRING(dest, dest_len)
#define ZEND_PARSE_PARAMETERS_START(min_num_args, max_num_args)