Skip to content

"fail bad gmtime" bare message from win32.c:filetime_from_time #19668

Closed
@kberry

Description

@kberry

In the source file win32/win32.tex, function
filetime_from_time, is this little block:

    pt = gmtime(&Time);
    if (!pt) {
        pFileTime->dwLowDateTime = 0;
        pFileTime->dwHighDateTime = 0;
        fprintf(stderr, "fail bad gmtime\n");
        return FALSE;
    }

It does not seem correct for the Perl interpreter to output such a "bare" message with no possibility of trapping. Given that it's returning false, no message at all seems needed. Maybe it was left over from debugging?

Unfortunately we cannot find any reliable way to reproduce it on a given Windows system, or discern why the gmtime call is failing in the first place. Presumably related to usual Windows non-deterministicness. But given the simplicity of the code causing it, I thought I would report it anyway. Thanks for considering.

P.S. It was reported by several Windows users installing TeX Live. As far as we could trace it, Seems that HTTP::Date which in turn is used by LWP in various places via HTTP::Date::time2str, which in turn uses gmtime, is the high-level sequence of events. We call that repeatedly during a TL install.

The reports we received don't say anything beyond reporting the message showing up, but for completeness, here's an example:
https://tug.org/pipermail/tex-live/2022-April/048006.html

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions