Hello people,

When working with the JSON gem today, I found an annoyance. It  
currently uses Time#to_s to create a JSON representation of a Time  
object. The problem with this is that not every browser apparently  
handles this format.

Because of this, I started to dig into it and found that Ruby's format  
of Time#to_s doesn't adhere to any official standard. It looks like  
UNIX date output for some locales and also has a resemblance to  
RFC2822, but the location of the year differs.

Is there any reason that Time#to_s doesn't adhere to any standard? It  
would probably make the output easier to parse, for example for  
browsers, but I think it would be better overall to use a standard here.

Another related topic is DateTime#to_s. Is the output difference on  
purpose here? Or has it never been given any thought?

I hope some people here could shed some light on this.

-- 
Regards,

Dirkjan Bussink