Mercurial > hg > octave-lyh
comparison liboctave/oct-time.cc @ 6941:3d555cd5ad0f
[project @ 2007-10-01 18:58:29 by jwe]
author | jwe |
---|---|
date | Mon, 01 Oct 2007 18:58:29 +0000 |
parents | fabb1be5fd84 |
children | 963878fa3267 |
comparison
equal
deleted
inserted
replaced
6940:cf41866340d3 | 6941:3d555cd5ad0f |
---|---|
25 #include <config.h> | 25 #include <config.h> |
26 #endif | 26 #endif |
27 | 27 |
28 #include <climits> | 28 #include <climits> |
29 #include <cmath> | 29 #include <cmath> |
30 #include <ctime> | |
30 | 31 |
31 #ifdef HAVE_UNISTD_H | 32 #ifdef HAVE_UNISTD_H |
32 #ifdef HAVE_SYS_TYPES_H | 33 #ifdef HAVE_SYS_TYPES_H |
33 #include <sys/types.h> | 34 #include <sys/types.h> |
34 #endif | 35 #endif |
353 | 354 |
354 char *p = strsave (str.c_str ()); | 355 char *p = strsave (str.c_str ()); |
355 | 356 |
356 char *q = oct_strptime (p, fmt.c_str (), &t); | 357 char *q = oct_strptime (p, fmt.c_str (), &t); |
357 | 358 |
359 // Fill in wday and yday. | |
360 t.tm_isdst = -1; | |
361 mktime (&t); | |
362 | |
358 if (q) | 363 if (q) |
359 nchars = q - p + 1; | 364 nchars = q - p + 1; |
360 else | 365 else |
361 nchars = 0; | 366 nchars = 0; |
362 | 367 |