Table of Contents

Class Iso8601DateFormatter

Namespace
log4net.DateFormatter
Assembly
log4net.dll

Formats the DateTime as "yyyy-MM-dd HH:mm:ss,fff".

public class Iso8601DateFormatter : AbsoluteTimeDateFormatter, IDateFormatter
Inheritance
Iso8601DateFormatter
Implements
Inherited Members

Remarks

Formats the DateTime specified as a string: "yyyy-MM-dd HH:mm:ss,fff".

Constructors

Iso8601DateFormatter()

Default constructor

public Iso8601DateFormatter()

Remarks

Initializes a new instance of the Iso8601DateFormatter class.

Methods

FormatDateWithoutMillis(DateTime, StringBuilder)

Formats the date without the milliseconds part

protected override void FormatDateWithoutMillis(DateTime dateToFormat, StringBuilder buffer)

Parameters

dateToFormat DateTime

The date to format.

buffer StringBuilder

The string builder to write to.

Remarks

Formats the date specified as a string: "yyyy-MM-dd HH:mm:ss".

The base class will append the ",fff" milliseconds section. This method will only be called at most once per second.