Happens in both xemacs-21.4 and latest XEmacs beta on Windows.
The problem is that list_to_time allows negative integers at the head of
the time list. Hence a negative time is returned. In the case localtime
on Windows returns NULL. The code does not check for it.
The patch below fixes the problem. It was tested on Windows 2000.
Nick.