PLAT-605: make use of "localtime_r" rather than "localtime", which is no...

...t thread safe and can cause deadlocks within the libc