/* Copyright (c) 2007-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "utc-mktime.h"
{
int diff;
return diff;
return diff;
return diff;
return diff;
return diff;
}
{
}
#ifdef HAVE_TIMEGM
/* Normalization done by timegm is considered a failure here, since it means
* the timestamp is not valid as-is. Leap second 60 is adjusted to 59 before
* this though. */
{
time_t t;
return (time_t)-1;
return t;
}
#else
{
time_t t;
/* we'll do a binary search across the entire valid time_t range.
when gmtime()'s output matches the tm parameter, we've found the
correct time_t value. this also means that if tm contains invalid
values, -1 is returned. */
#ifdef TIME_T_SIGNED
t = 0;
#else
#endif
if (dir == 0)
return t;
if (bits < 0)
break;
if (dir < 0)
else
}
return (time_t)-1;
}
#endif