00001
00002
00003
00004
00005
00006
00007
00008
00012 #include <iostream>
00013
00014
00015 #include "zypp/base/String.h"
00016
00017 #include "zypp/Date.h"
00018
00019 using std::endl;
00020
00022 namespace zypp
00023 {
00024
00026
00027
00028
00029
00030 Date::Date( const std::string & seconds_r )
00031 { str::strtonum( seconds_r, _date ); }
00032
00034
00035
00036
00037
00038 std::string Date::form( const std::string & format_r ) const
00039 {
00040 static char buf[1024];
00041 if ( ! strftime( buf, 1024, format_r.c_str(), localtime( &_date ) ) )
00042 return std::string();
00043 return buf;
00044 }
00045
00047 }