RollingCalendar Class Reference

Collaboration diagram for RollingCalendar:

Collaboration graph
[legend]
List of all members.

Public Member Functions

PeriodicityType computeTriggeringPeriod (const String &datePattern)
const helpers::TimeZonePtr getTimeZone () const
void setTimeZone (const helpers::TimeZonePtr &timeZone)

Detailed Description

RollingCalendar is a helper class to DailyRollingFileAppender. Given a periodicity type and the current time, it computes the start of the next interval.


Member Function Documentation

RollingCalendar::PeriodicityType computeTriggeringPeriod const String &  datePattern  ) 
 

This method computes the roll over period by looping over the periods, starting with the shortest, and stopping when the r0 is different from from r1, where r0 is the epoch formatted according the datePattern (supplied by the user) and r1 is the epoch+nextMillis(i) formatted according to datePattern. All date formatting is done in GMT and not local format because the test logic is based on comparisons relative to 1970-01-01 00:00:00 GMT (the epoch).

const helpers::TimeZonePtr getTimeZone  )  const [inline]
 

Gets the time zone.

Returns:
the time zone object associated with this calendar.

void setTimeZone const helpers::TimeZonePtr timeZone  )  [inline]
 

Sets the time zone with the given time zone value.

Returns:
value the given time zone.


The documentation for this class was generated from the following files:
  • dailyrollingfileappender.h
  • dailyrollingfileappender.cpp

Copyright © 1999-2004, Apache Software Foundation