TZ-Lib  $VERSION$
TimeZoneLib::PosixRule Class Reference

#include <tzfile.h>

Public Types

enum  StartType { StartNone, StartDay0, StartDay1, StartWeek }
 

Public Member Functions

 PosixRule ()
 
 PosixRule (const PosixRule &)
 
 PosixRule (QString)
 
QString asString () const
 
QString daylightName () const
 
qint32 daylightOffset () const
 
bool haveDST () const
 
TZRule nextRule (const TZRule &) const
 
PosixRuleoperator= (const PosixRule &)
 
TZRule ruleForLocalTime (qint64) const
 
TZRule ruleForTime (qint64) const
 
QList< TZRulerulesForYear (int) const
 
QString standardName () const
 
qint32 standardOffset () const
 

Member Enumeration Documentation

Enumerator
StartNone 

no calculation, return a rule with a simple offset

StartDay0 

a specific day of year, start counting at zero, feb 29th counts if present

StartDay1 

a specific day of year, start counting at one, feb 29th does not count if present

StartWeek 

start at a specifc week day in a specific week of a specific month

Constructor & Destructor Documentation

PosixRule::PosixRule ( )

instantiates an empty ruleset, always returns a UTC/empty rule

References StartWeek.

Referenced by PosixRule().

PosixRule::PosixRule ( const PosixRule p)

copies a ruleset

References operator=().

PosixRule::PosixRule ( QString  s)

Member Function Documentation

QString TimeZoneLib::PosixRule::asString ( ) const
inline

returns the posix string of this ruleset

Referenced by scanFile().

QString TimeZoneLib::PosixRule::daylightName ( ) const
inline

returns the name of daylight saving time

qint32 TimeZoneLib::PosixRule::daylightOffset ( ) const
inline

returns the offset from UTC in seconds for daylight saving time

bool TimeZoneLib::PosixRule::haveDST ( ) const
inline

returns true of this rule has daylight saving time

TZRule PosixRule::nextRule ( const TZRule r) const

takes the given rule and calculates the one that would follow it

References TimeZoneLib::stamp2Date().

PosixRule & PosixRule::operator= ( const PosixRule p)

copies a ruleset

Referenced by PosixRule().

TZRule PosixRule::ruleForLocalTime ( qint64  ts) const

calculates and returns a rule for a specific timestamp moved by the prospective offset

References rulesForYear(), and TimeZoneLib::stamp2Date().

Referenced by TimeZoneLib::TZFile::ruleForLocalTime().

TZRule PosixRule::ruleForTime ( qint64  ts) const

calculates and returns a rule for a specific timestamp

References rulesForYear(), and TimeZoneLib::stamp2Date().

Referenced by TimeZoneLib::TZFile::ruleForTime().

QList< TZRule > PosixRule::rulesForYear ( int  year) const

returns all rules that match the given year

References TimeZoneLib::daysSinceEpoch(), TimeZoneLib::SecondsPerDay, and StartNone.

Referenced by ruleForLocalTime(), and ruleForTime().

QString TimeZoneLib::PosixRule::standardName ( ) const
inline

returns the name of standard time

qint32 TimeZoneLib::PosixRule::standardOffset ( ) const
inline

returns the offset from UTC in seconds for standard time


The documentation for this class was generated from the following files: