and handle if the cl;ock is set backwards!

SVN revision: 34680
This commit is contained in:
Carsten Haitzler 2008-05-27 08:03:46 +00:00
parent e3519ff383
commit 4e318745a8
1 changed files with 2 additions and 1 deletions

View File

@ -37,7 +37,8 @@ _embryo_time_date(Embryo_Program *ep, Embryo_Cell *params)
if (params[0] != (8 * sizeof(Embryo_Cell))) return 0;
gettimeofday(&timev, NULL);
tt = (time_t)(timev.tv_sec);
if (tt > (last_tzset + 1))
if ((tt > (last_tzset + 1)) ||
(tt < (last_tzset - 1)))
{
last_tzset = tt;
tzset();