Dual-Life / Time-Piece

Object Oriented time objects
Other
15 stars 33 forks source link

Respect islocal of existing object in copy constructor #37

Closed Grinnz closed 6 years ago

Grinnz commented 7 years ago

When Time::Piece->new($obj) is called on a UTC Time::Piece object, it would be passed unconditionally to localtime, resulting in the wrong time being set in the copy.

Grinnz commented 7 years ago

If this issue is fixed, #36 should theoretically not cause any problems, but that should still be fixed IMO as the copy constructor should never modify the object it is copying.

smith153 commented 7 years ago

Thanks for these! I will take a look in the next week or two, out of town at the moment.

smith153 commented 6 years ago

This was a good catch, thank you!