Added DB timestamp to now-format conversion function and tests