< class="prominent-subhead ">

How to configure timestamps in the K2 Host Server log

~~repeating-content.html~~
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Introduction

When using the K2 Host Server Log for troubleshooting purposes it might prove difficult as the hours are logged on a repeating 12 hour window without an AM or PM. It is possible to change this to reflect the time in a 24 hour format. This KB article shows how to configure the HostServerLogging.config file to reflect such time.

Implementation:

The default format used for timestamps is set to use a lower case h, which means that the hours are logged on a repeating 12 hour window without an AM or PM.

To reflect the time in a 24 hour format, simply change the date time formatting in the HostServerLogging.Config file to use an uppercase H which will cause the time to be logged on a 24 hour format (12 would be noon, 24 would be midnight).

The HostServerLogging.Config file can be found in the following location:

C:\Program Files\K2 blackpearl\Host Server\Bin

Example Code:

<!-- Set Date format-->

<add key="DateFormat" value="yyyy-MM-dd HH:mm:ss" />

The HostServerLogging.Config file can be found in the following location:

C:\Program Files\K2 blackpearl\Host Server\Bin