Improve ToolBox PtsToTimeString

The new method is cleaner and faster, and I also added a unit test.