puppetlabs/puppet — pull request #1323 by ahpook (2012-12-07 21:49:17+00:00)
Title: (#15496) Correctly determine timezone offset when serializing to yaml

A user reported the incorrect offset in reports for hosts
in the timezone "America/Caracas", which is -04:30 from GMT.
The zaml time interpolation did not handle negative fractional
timezones correctly, because Ruby rounds down when integer
division results in a remainder, which caused "-4.5" to result
in "-5".

This patch coerces the denominator into a float, so the printf
formatting's truncation works correctly.

I've also added tests around this, which fail before the change
and pass afterwards.