lib: added safety check in Timezone ctor for negative minutes
commit22a29a9b96698c43aee169a963a4dd22e7b92ee7
authorChris Frey <cdfrey@foursquare.net>
Tue, 31 Jan 2012 07:56:52 +0000 (31 02:56 -0500)
committerChris Frey <cdfrey@foursquare.net>
Tue, 31 Jan 2012 07:56:52 +0000 (31 02:56 -0500)
treeb27c4f6b2fcb3ae8a552d6198c59df8e230c20ec
parent71c0f976e5eb998f35e3aaeadf49f82edc1a5696
lib: added safety check in Timezone ctor for negative minutes

The Timezone record class always works with minutes as positive.
If the user happens to enter a negative minutes in the ctor, this
still works, but just do a quick flip first.

Note that the hard coded TimeZone table in time.cc uses negative
minutes, so this safety check makes sense.
src/r_timezone.cc
src/r_timezone.h