https://github.com/python/cpython
Revision d74ae9d17cb2f1ff3f254092fb36683173a79492 authored by Alexey Izbyshev on 06 November 2018, 04:29:07 UTC, committed by Miss Islington (bot) on 06 November 2018, 04:29:41 UTC
The test depended on '/usr/share/zoneinfo/posixrules' or equivalent
because it set TZ without explicit DST transition rules. At least
on OpenSUSE Tumbleweed that file is linked to '/etc/localtime',
making the test fail with certain local timezones,
such as 'Europe/Moscow' which doesn't have DST transitions since 2011.
(cherry picked from commit f1b9ad3d38c11676b45edcbf2369239bae436e56)

Co-authored-by: Alexey Izbyshev <izbyshev@ispras.ru>
1 parent 3e3e1a2
Raw File
Tip revision: d74ae9d17cb2f1ff3f254092fb36683173a79492 authored by Alexey Izbyshev on 06 November 2018, 04:29:07 UTC
closes bpo-35171: Fix test_TimeRE_recreation_timezone failure on some systems. (GH-10347)
Tip revision: d74ae9d
generrmap.c
#include <stdio.h>
#include <errno.h>

/* Extract the mapping of Win32 error codes to errno */

int main()
{
    int i;
    printf("/* Generated file. Do not edit. */\n");
    printf("int winerror_to_errno(int winerror)\n");
    printf("{\n\tswitch(winerror) {\n");
    for(i=1; i < 65000; i++) {
        _dosmaperr(i);
        if (errno == EINVAL)
            continue;
        printf("\t\tcase %d: return %d;\n", i, errno);
    }
    printf("\t\tdefault: return EINVAL;\n");
    printf("\t}\n}\n");
}
back to top