A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-January/107276.html below:

[Python-Dev] Checking input range in time.asctime and time.ctime

[Python-Dev] Checking input range in time.asctime and time.ctime [Python-Dev] Checking input range in time.asctime and time.ctimeVictor Stinner victor.stinner at haypocalc.com
Thu Jan 6 12:47:22 CET 2011
Le mercredi 05 janvier 2011 à 23:48 -0500, Alexander Belopolsky a
écrit :
> I would be happy with just
> 
>    if accept2dyear:
>        if 69 <= y <= 99:
>            y += 1900
>        elif 0 <= y <= 68:
>            y += 2000
>    # call system function with tm_year = y - 1900

Perfect. That's what I expect from a "2 digits" option: it should not
touch 3 (100..999) or 4 digits digits (>= 1000).

Remember that the "2 digit option" is a hack to workaround the y2k bug.
It is maybe time to try to remove the workaround: disable accept2dyear
by default and remove PYTHONY2K env var.

> but I thought that would be too radical.

Why ?

Victor

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4