Changeset 204
- Timestamp:
- Sep 10, 2006, 11:03:48 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/utility.cc
r201 r204 100 100 year=atoi(tmp.c_str()); 101 101 timeinfo->tm_year = year - 1900; 102 std::cout << tmp << " " << year << std::endl;103 102 104 103 getline(sstream,tmp,'-'); 105 104 month=atoi(tmp.c_str()); 106 105 timeinfo->tm_mon = month - 1; 107 std::cout << tmp << " " << month << std::endl;108 106 109 107 getline(sstream,tmp,'T'); 110 108 day=atoi(tmp.c_str()); 111 109 timeinfo->tm_mday = day; 112 std::cout << tmp << " " << day << std::endl;113 110 114 111 getline(sstream,tmp,':'); 115 112 hour=atoi(tmp.c_str()); 116 113 timeinfo->tm_hour = hour; 117 std::cout << tmp << " " << hour << std::endl;118 114 119 115 getline(sstream,tmp,':'); 120 116 minute=atoi(tmp.c_str()); 121 117 timeinfo->tm_min = minute; 122 std::cout << tmp << " " << minute << std::endl;123 118 124 119 getline(sstream,tmp,'.'); 125 120 second=atoi(tmp.c_str()); 126 121 timeinfo->tm_sec = second; 127 std::cout << tmp << " " << second << std::endl;128 122 129 123 return mktime(timeinfo);
Note: See TracChangeset
for help on using the changeset viewer.