OB.DAAC Logo
NASA Logo
Ocean Color Science Software

ocssw V2022

#include <LeapSecondDatabase.hpp>

Public Member Functions

 LeapSecondDatabase ()
 
 LeapSecondDatabase (const std::string &file)
 
float leap_seconds_since (const boost::posix_time::ptime &time)
 
bool is_leap_second (const boost::posix_time::ptime &time)
 

Static Public Member Functions

static LeapSecondDatabaseget_default ()
 

Detailed Description

Reader of leap second databases.

Example

Definition at line 43 of file LeapSecondDatabase.hpp.

Constructor & Destructor Documentation

◆ LeapSecondDatabase() [1/2]

Default constructor, using default locations for database file.

The default locations are checked are:

  • The environment variable $LEAPSECOND_DAT
  • $OCVARROOT/viirsn/IETTime.dat
  • $OCVARROOT/modis/leapsec.dat

◆ LeapSecondDatabase() [2/2]

LeapSecondDatabase ( const std::string file)
inlineexplicit

Read the database at the given location.

Definition at line 57 of file LeapSecondDatabase.hpp.

Member Function Documentation

◆ get_default()

static LeapSecondDatabase& get_default ( )
inlinestatic

Obtain a singleton of a default database.

Definition at line 61 of file LeapSecondDatabase.hpp.

◆ is_leap_second()

bool is_leap_second ( const boost::posix_time::ptime &  time)

Check if a given time is a leap second.

Parameters
timeThe date/time to check
Returns
true if time is a leap second

◆ leap_seconds_since()

float leap_seconds_since ( const boost::posix_time::ptime &  time)

Look up how many leap seconds are in effect on a given date.

Parameters
timeThe date/time to check
Returns
the number of leap seconds in effect

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