Replaced non-thread-safe localtime with thread-safe equivalent localtime_r
Replaced non-thread-safe localtime with thread-safe equivalent localtime_r

DDVTECH/mistserver,DDVTECH/mistserver,DDVTECH/mistserver,DDVTECH/mistserver,DDVTECH/mistserver