use clock functions for datetime conversion