Moved time formatting logic to separate method

In case someone needs to override it. It's quite expensive logic. At the moment it takes about 20% of script execution time when iterating through log file