fix #2 by adding unit tests for to_seconds