| Home | Libraries | People | FAQ | More

## Class template second_clock

boost::date_time::second_clock — A clock providing time level services based on C time_t capabilities.

## Synopsis

    // In header: <boost/date_time/time_clock.hpp>

    template<typename time_type>
    class second_clock {
    public:
      // types
      typedef time_type::date_type          date_type;
      typedef time_type::time_duration_type time_duration_type;

      // public static functions
      static time_type local_time();
      static time_type universal_time();
      template<typename time_zone_type>
        static time_type local_time(boost::shared_ptr< time_zone_type >);

      // private static functions
      static time_type create_time(::std::tm *);
    };

## Description

This clock provides resolution to the 1 second level

### `second_clock` public static functions

1.     static time_type local_time();

2.     static time_type universal_time();

   Get the current day in universal date as a ymd_type.

3.     template<typename time_zone_type>
         static time_type local_time(boost::shared_ptr< time_zone_type > tz_ptr);

### `second_clock` private static functions

1.     static time_type create_time(::std::tm * current);