Created time helper functions

Should not be merged yet.
Changed it.