2020 Leap Day Bugs
codeofmatt.com
2020 Leap Day Bugs
1–10 of 150 posts
Re: 2020 Leap Day Bugs
#2Re: 2020 Leap Day Bugs
#3This is why no one should ever ever write their own Time or Date library. The number of edge cases is simply enormous
Re: 2020 Leap Day Bugs
#4 isotime = datetime.strptime(time.get('title'), '%a %d %b %I:%M:%S %p').replace(year=YEAR, tzinfo=TZ).isoformat()
ValueError: day is out of range for month
It's not mission-critical, so I'm just going to wait it out until tomorrow.EDIT: Hacked it out.
isotime = datetime.strptime(f"{time.get('title')} {YEAR} {tzoffset:+03d}00", '%a %d %b %I:%M:%S %p %Y %z').isoformat()Re: 2020 Leap Day Bugs
#5This is why no one should ever ever write their own Time or Date library. The number of edge cases is simply enormous
Re: 2020 Leap Day Bugs
#6Re: 2020 Leap Day Bugs
#7A line in one of my Python daemons has been crashing it repeatedly all day: isotime = datetime.strptime(time.get('title'), '%a %d %b %I:%M:%S %p').replace(year=YEAR, tzinfo=TZ).isoformat() ValueError: day is out of range for month It's not mission-critical, so I'm just going to wait it out until tomorrow. EDIT: Hacked it out. isotime = datetime.strptime(f"{time.get('title')} {YEAR} {tzoffset:+03d}00", '%a %d %b %I:%M…
Re: 2020 Leap Day Bugs
#8A line in one of my Python daemons has been crashing it repeatedly all day: isotime = datetime.strptime(time.get('title'), '%a %d %b %I:%M:%S %p').replace(year=YEAR, tzinfo=TZ).isoformat() ValueError: day is out of range for month It's not mission-critical, so I'm just going to wait it out until tomorrow. EDIT: Hacked it out. isotime = datetime.strptime(f"{time.get('title')} {YEAR} {tzoffset:+03d}00", '%a %d %b %I:%M…
Re: 2020 Leap Day Bugs
#9Re: 2020 Leap Day Bugs
#10Why doesn't the syslog protocol (RFC5424) deal with leap seconds (the seconds field goes to 00-59, not 00-60)? Are they using UTC (they would have to ignore LS and have crappier logs) or TAI (doesn't have LS)?
https://mailarchive.ietf.org/arch/msg/syslog/DDLgKsRPITFXYSB...
http://www.madore.org/~david/computers/unix-leap-seconds.htm...
https://tools.ietf.org/html/rfc5424