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

#include <tzfile.h>

Public Member Functions

 TZRule ()
 
 TZRule (const TZRule &)
 
QString abbreviation () const
 
qint64 endTime () const
 
bool isDST () const
 
bool matches (qint64 ts) const
 
bool matchesLocal (qint64 ts) const
 
qint32 offsetFromUTC () const
 
bool operator< (const TZRule &r) const
 
bool operator<= (const TZRule &r) const
 
TZRuleoperator= (const TZRule &)
 
qint64 startTime () const
 

Friends

class PosixRule
 
class TZFile
 

Constructor & Destructor Documentation

TZRule::TZRule ( )

creates an invalid rule, all requests to it are handled as if they were for the UTC zone

TZRule::TZRule ( const TZRule r)

copies a rule

References operator=().

Member Function Documentation

QString TimeZoneLib::TZRule::abbreviation ( ) const
inline

returns the abbreviated time zone name of this rule (eg. MET, or MEST)

Referenced by TimeStamp::zoneAbbreviation().

qint64 TimeZoneLib::TZRule::endTime ( ) const
inline

returns the time stamp at which this rule becomes inactive

bool TimeZoneLib::TZRule::isDST ( ) const
inline

returns true if this rule refers to daylight saving time

bool TimeZoneLib::TZRule::matches ( qint64  ts) const
inline

returns true if the given time stamp matches the validity period of this rule

bool TimeZoneLib::TZRule::matchesLocal ( qint64  ts) const
inline

returns true if the given time stamp matches the validity period of this rule moved by its internal offset

qint32 TimeZoneLib::TZRule::offsetFromUTC ( ) const
inline

returns the offset of this rule towards UTC in seconds, positive values are east

Referenced by TimeStamp::moveToZone(), and TimeStamp::setZone().

bool TimeZoneLib::TZRule::operator< ( const TZRule r) const
inline
bool TimeZoneLib::TZRule::operator<= ( const TZRule r) const
inline
TZRule & TZRule::operator= ( const TZRule r)

copies a rule

Referenced by TZRule().

qint64 TimeZoneLib::TZRule::startTime ( ) const
inline

returns the time stamp at which this rule becomes active

Friends And Related Function Documentation

friend class PosixRule
friend
friend class TZFile
friend

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