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

#include <tzfile.h>

Public Member Functions

 TZFile ()
 
 TZFile (QString tz)
 
 TZFile (const char *tz)
 
 TZFile (QIODevice &)
 
 TZFile (const QByteArray &)
 
 TZFile (const TZFile &)
 
 TZFile (int offset)
 
QList< TZRulecachedRules () const
 
QString dirName () const
 returns the DB directory name only More...
 
QString fileName () const
 returns the full file name of the zone file, if known More...
 
QList< TZRulefileRules () const
 
bool isValid () const
 
QString name () const
 
TZFileoperator= (const TZFile &)
 
PosixRule posixRule () const
 
TZRule ruleForLocalTime (qint64)
 
TZRule ruleForTime (qint64)
 
void setName (QString n)
 
QString version () const
 tries to determine version info for this zone file More...
 

Static Public Member Functions

static QString builtinVersion ()
 returns the built-in version of the Olson-DB More...
 
static QString libraryVersion ()
 returns the library version More...
 
static QStringList searchPath ()
 
static void setSearchPath (const QStringList &)
 

Constructor & Destructor Documentation

TZFile::TZFile ( )

constructs a time zone file which handles UTC as local time zone

TZFile::TZFile ( QString  tz)

tries to find the zone tz in the search path, tz is always regarded as a relative file name

TZFile::TZFile ( const char *  tz)

tries to find the zone tz in the search path, tz is always regarded as a relative file name

TZFile::TZFile ( QIODevice &  d)

loads the time zone from the given device

TZFile::TZFile ( const QByteArray &  a)

loads the time zone from the given byte array, the array must contain a complete time zone file

TZFile::TZFile ( const TZFile z)

copies a zone file object

References operator=().

TZFile::TZFile ( int  offset)

does not actually load a file, but constructs a virtual file that corresponds to a specific offset east of UTC in minutes

Member Function Documentation

QString TZFile::builtinVersion ( )
static

returns the built-in version of the Olson-DB

References builtinpath.

QList<TZRule> TimeZoneLib::TZFile::cachedRules ( ) const
inline

returns all currently cached rules that were auto-generated during the lifetime of this file object

QString TZFile::dirName ( ) const

returns the DB directory name only

QString TimeZoneLib::TZFile::fileName ( ) const
inline

returns the full file name of the zone file, if known

QList<TZRule> TimeZoneLib::TZFile::fileRules ( ) const
inline

returns the list of rules that were encoded in the file

bool TimeZoneLib::TZFile::isValid ( ) const
inline

returns whether this is a valid time zone file, invalid files handle all requests as though they were for the UTC zone

Referenced by TimeZoneLib::getRegistryZone(), TimeStamp::loadZone(), and TimeStamp::setDefaultZone().

QString TZFile::libraryVersion ( )
static

returns the library version

QString TimeZoneLib::TZFile::name ( ) const
inline

returns the zone name, this may be empty if the zone was loaded from an already open device or an byte array

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

TZFile & TZFile::operator= ( const TZFile z)

Referenced by TZFile().

PosixRule TimeZoneLib::TZFile::posixRule ( ) const
inline

returns the fallback POSIX rule that was encoded in the file (or an invalid rule if there was none)

Referenced by scanFile().

TZRule TZFile::ruleForLocalTime ( qint64  ts)

returns a rule that matches a specific local time, the timestamp given is a Unix timestamp plus the offset of the rule that will match; in other words it was calculated assuming UTC and now looks for a rule that will provide a correcting offset

References MAXCACHESIZE, and TimeZoneLib::PosixRule::ruleForLocalTime().

Referenced by TimeStamp::moveToZone().

TZRule TZFile::ruleForTime ( qint64  ts)

returns a rule that matches a specific UTC based time

References MAXCACHESIZE, and TimeZoneLib::PosixRule::ruleForTime().

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

QStringList TZFile::searchPath ( )
static

returns the search paths for time zone files

void TimeZoneLib::TZFile::setName ( QString  n)
inline

overrides the zone name; this has no effect one the zones contents and behavior

Referenced by TimeStamp::resetRepository(), and TimeStamp::setDefaultZone().

void TZFile::setSearchPath ( const QStringList &  s)
static

sets new search paths for time zone files

Referenced by TimeStamp::setSearchPath().

QString TZFile::version ( ) const

tries to determine version info for this zone file


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