[Python-Dev] Checking input range in time.asctime and time.ctime (original) (raw)
Victor Stinner victor.stinner at haypocalc.com
Thu Jan 6 12:47:22 CET 2011
- Previous message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Next message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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 tmyear = 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
- Previous message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Next message: [Python-Dev] Checking input range in time.asctime and time.ctime
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]