added toSeconds and fromSeconds to times. fixes #334
Merge pull request #384 from Tass/master

Fixes #334.