fixed converting reference times
Merge pull request #390 from cpelley/fixtimeconvert

Fixed reference time conversion.