travisjeffery / timecop

A gem providing "time travel", "time freezing", and "time acceleration" capabilities, making it simple to test time-dependent code. It provides a unified method to mock Time.now, Date.today, and DateTime.now in a single call.
MIT License
3.36k stars 223 forks source link

DateTime.parse does not handle CWeek correctly #422

Open joshuacronemeyer opened 3 months ago

joshuacronemeyer commented 3 months ago
3.0.1 :026 > DateTime.parse('1976-W53-6')
3.0.1 :027 > DateTime.parse('1976-W53-6 13:01')
3.0.1 :027 > DateTime.parse('1976-W53-6 13:00:01')

I don't think we handle any of these correctly. https://github.com/travisjeffery/timecop/pull/415 is an example of fixing this kind of bug.