Comparing files RollingFileAppender.cs and ORIGINAL ROLLINGFILEAPPENDER.CS ***** RollingFileAppender.cs // This file was modified by Lanchon to add the ability to // roll files based on universal time (UTC). [2005-11-15] ***** ORIGINAL ROLLINGFILEAPPENDER.CS ***** ***** RollingFileAppender.cs /// /// Gets or sets a value indicating whether to use local or universal (UTC) /// time to generate file names when rolling over on date. /// /// /// true if using universal time (UTC) to generate file names, /// false if using local time. /// /// /// By default this property is set to false, indicating that file names /// are generated using local time. /// public bool UniversalTime { get { return m_universalTime; } set { m_universalTime = value; } } ***** ORIGINAL ROLLINGFILEAPPENDER.CS ***** ***** RollingFileAppender.cs { DateTime n = AdjustTimeZone(m_dateTime.Now); if (n >= m_nextCheck) ***** ORIGINAL ROLLINGFILEAPPENDER.CS { DateTime n = m_dateTime.Now; if (n >= m_nextCheck) ***** ***** RollingFileAppender.cs } last = AdjustTimeZone(last); LogLog.Debug("RollingFileAppender: ["+last.ToString(m_datePattern,System.Globalization. ***** ORIGINAL ROLLINGFILEAPPENDER.CS } LogLog.Debug("RollingFileAppender: ["+last.ToString(m_datePattern,System.Globalization. ***** ***** RollingFileAppender.cs { if (! curFileName.StartsWith(baseFile + AdjustTimeZone(m_dateTime.Now).ToString(m_datePattern, ystem.Globalization.DateTimeFormatInfo.InvariantInfo))) { ***** ORIGINAL ROLLINGFILEAPPENDER.CS { if (! curFileName.StartsWith(baseFile + m_dateTime.Now.ToString(m_datePattern, System.Globaliza ion.DateTimeFormatInfo.InvariantInfo))) { ***** ***** RollingFileAppender.cs { m_now = AdjustTimeZone(m_dateTime.Now); m_rollPoint = ComputeCheckPeriod(m_datePattern); ***** ORIGINAL ROLLINGFILEAPPENDER.CS { m_now = m_dateTime.Now; m_rollPoint = ComputeCheckPeriod(m_datePattern); ***** ***** RollingFileAppender.cs /// /// Value indicating whether to use local or universal (UTC) /// time to generate file names when rolling over on date. /// private bool m_universalTime = false; ***** ORIGINAL ROLLINGFILEAPPENDER.CS ***** ***** RollingFileAppender.cs /// /// Converts a local time to the time zone in which the file naming and rolling /// should take place. /// /// The local time to convert. /// The passed local time converted to the time zone in which the file /// naming and rolling should take place. private DateTime AdjustTimeZone(DateTime localTime) { return m_universalTime ? localTime.ToUniversalTime() : localTime; } ***** ORIGINAL ROLLINGFILEAPPENDER.CS *****