mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Backout my changes in rev. 1.32 and 1.33. There is some code that depends
on the previous behaviour. This also brings strptime(3) behaviour back in line with the other BSDs. Approved by: markm (mentor)
This commit is contained in:
parent
16dbbeec74
commit
6c688436bb
1 changed files with 2 additions and 4 deletions
|
|
@ -518,14 +518,12 @@ strptime(const char * __restrict buf, const char * __restrict fmt,
|
|||
struct tm * __restrict tm)
|
||||
{
|
||||
char *ret;
|
||||
time_t t;
|
||||
int gmt;
|
||||
|
||||
gmt = 0;
|
||||
memset((void*)tm, 0, sizeof(struct tm));
|
||||
ret = _strptime(buf, fmt, tm, &gmt);
|
||||
if (ret) {
|
||||
t = gmt ? timegm(tm) : mktime(tm);
|
||||
if (ret && gmt) {
|
||||
time_t t = timegm(tm);
|
||||
localtime_r(&t, tm);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue