mcls (Maarten Claes)
- Login: mcls
- Email: maartencls@gmail.com
- Registered on: 01/12/2015
- Last sign in: 02/10/2015
Issues
| open | closed | Total | |
|---|---|---|---|
| Assigned issues | 0 | 0 | 0 |
| Reported issues | 0 | 1 | 1 |
Activity
01/12/2015
-
04:40 PM Ruby Bug #10733: Time.httpdate raises ArgumentError when DateTime.now.httpdate is provided as input
After some experimentation it looks like this has something do with the fact that `DateTime#httpdate` returns an `US-ASCII` encoded string.
```ruby
require 'time'
from_httpdate = DateTime.now.httpdate
as_string = "Mon, 12 J...-
12:14 PM Ruby Bug #10733 (Closed): Time.httpdate raises ArgumentError when DateTime.now.httpdate is provided as input
- An irb session demonstrating the bug:
```
irb(main):001:0> require 'time'
=> true
irb(main):002:0> Time.httpdate("Mon, 12 Jan 2015 12:04:15 GMT")
=> 2015-01-12 12:04:15 UTC
irb(main):003:0> DateTime.now.httpdate.to_s
=> "Mon, 12...