70 static const int min[8] = { 0, 1, 1, 0, 0, 0, 0, 0 };
71 static const int max[8] = { 99, 12, 31, 23, 59, 59, 12, 59 };
83 for (
i = 0;
i < 6;
i++) {
84 if ((
i == 5) && ((
a[
o] ==
'Z') || (
a[
o] ==
'+') || (
a[
o] ==
'-'))) {
90 if ((
a[
o] <
'0') || (
a[
o] >
'9'))
96 if ((
a[
o] <
'0') || (
a[
o] >
'9'))
98 n = (
n * 10) +
a[
o] -
'0';
107 tm->tm_year =
n < 50 ?
n + 100 :
n;
129 else if ((
a[
o] ==
'+') || (
a[
o] ==
'-')) {
130 int offsign =
a[
o] ==
'-' ? 1 : -1,
offset = 0;
134 for (
i = 6;
i < 8;
i++) {
135 if ((
a[
o] <
'0') || (
a[
o] >
'9'))
139 if ((
a[
o] <
'0') || (
a[
o] >
'9'))
141 n = (
n * 10) +
a[
o] -
'0';
170 t.length = strlen(
str);
171 t.data = (
unsigned char *)
str;
175 (
unsigned char *)
str, t.length))
190 int offset_day,
long offset_sec)
209 if (offset_day || offset_sec) {
214 if ((ts->tm_year < 50) || (ts->tm_year >= 150))
218 if ((
p == NULL) || ((size_t)s->length <
len)) {
226 s->data = (
unsigned char *)
p;
230 ts->tm_mon + 1, ts->tm_mday, ts->tm_hour, ts->tm_min,
232 s->length = strlen(
p);