int qemu_timedate_diff(struct tm *tm)

{

    time_t seconds;



    if (rtc_date_offset == -1)

        if (rtc_utc)

            seconds = mktimegm(tm);

        else {

            struct tm tmp = *tm;

            tmp.tm_isdst = -1; /* use timezone to figure it out */

            seconds = mktime(&tmp);

	}

    else

        seconds = mktimegm(tm) + rtc_date_offset;



    return seconds - time(NULL);

}

int qemu_timedate_diff(struct tm *tm)

{

    time_t seconds;



    if (rtc_date_offset == -1)

        if (rtc_utc)

            seconds = mktimegm(tm);

        else {

            struct tm tmp = *tm;

            tmp.tm_isdst = -1; 

            seconds = mktime(&tmp);

	}

    else

        seconds = mktimegm(tm) + rtc_date_offset;



    return seconds - time(NULL);

}

int FUNC_0(struct VAR_0 *VAR_0)

{

    time_t seconds;



    if (rtc_date_offset == -1)

        if (rtc_utc)

            seconds = mktimegm(VAR_0);

        else {

            struct VAR_0 VAR_1 = *VAR_0;

            VAR_1.tm_isdst = -1; 

            seconds = mktime(&VAR_1);

	}

    else

        seconds = mktimegm(VAR_0) + rtc_date_offset;



    return seconds - time(NULL);

}

int FUNC_0(struct VAR_0 *VAR_0)
{ time_t seconds; if (rtc_date_offset == -1)
if (rtc_utc)
seconds = mktimegm(VAR_0); else { struct VAR_0 VAR_1 = *VAR_0; VAR_1.tm_isdst = -1; seconds = mktime(&VAR_1); } else
seconds = mktimegm(VAR_0) + rtc_date_offset; return seconds - time(NULL); }