treasure-data/td-logger-ruby — pull request #4 by y310 (2012-09-18 11:54:34+00:00)
Title: Add ActiveSupport::TimeWithZone#to_msgpack

This commit makes ``Time.zone.now.to_msgpack`` work with correct timezone.

### Detail

Now, in rails env, ``ActiveSupport::TimeWithZone#to_msgpack`` does not work like following example.

```ruby
irb(main):001:0> Time.now.to_msgpack
=> "\2712012-09-18 20:42:45 +0900"
irb(main):002:0> Time.zone.now.to_msgpack
=> "\2712012-09-18 20:42:49 +0000" # wrong timezone...
```

``Time.zone.now.to_msgpack`` calls ``Time#to_msgpack`` in ``TimeWithZone#method_missing``, and ``Time#to_msgpack`` calls ``Time#strftime`` in ``to_msgpack``.
But to get correct value, we need to call ``TimeWithZone#strftime``

### Reference
https://github.com/rails/rails/blob/v3.2.8/activesupport/lib/active_support/time_with_zone.rb#L179