Calling .to_json on TimeWithZone objects causes an error when TimeWithZone's "time" method returns a DateTime object rather than a Time object

I fix this by not generating microseconds when time is a DateTime object, as DateTime does not support a .usec method.