ignore
[platform/upstream/libzypp.git] / zypp / Date.cc
1 /*---------------------------------------------------------------------\
2 |                          ____ _   __ __ ___                          |
3 |                         |__  / \ / / . \ . \                         |
4 |                           / / \ V /|  _/  _/                         |
5 |                          / /__ | | | | | |                           |
6 |                         /_____||_| |_| |_|                           |
7 |                                                                      |
8 \---------------------------------------------------------------------*/
9 /** \file       zypp/Date.cc
10  *
11 */
12 #include <iostream>
13 //#include "zypp/base/Logger.h"
14
15 #include "zypp/Date.h"
16
17 using std::endl;
18
19 ///////////////////////////////////////////////////////////////////
20 namespace zypp
21 { /////////////////////////////////////////////////////////////////
22
23   ///////////////////////////////////////////////////////////////////
24   //
25   //    METHOD NAME : Date::form
26   //    METHOD TYPE : std::string
27   //
28   std::string Date::form( const std::string & format_r ) const
29   {
30     static char buf[1024];
31     if ( ! strftime( buf, 1024, format_r.c_str(), localtime( &_date ) ) )
32       return std::string();
33     return buf;
34   }
35
36   /////////////////////////////////////////////////////////////////
37 } // namespace zypp
38 ///////////////////////////////////////////////////////////////////