Changeset 5883 for trunk/centstorage/src/log.c
- Timestamp:
- 07/24/08 10:44:45 (4 months ago)
- Files:
-
- 1 modified
-
trunk/centstorage/src/log.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/centstorage/src/log.c
r5649 r5883 157 157 || !unit && openedTime + (3600 * 24 * ti) < time(NULL)) 158 158 { 159 char date[32] ;159 char date[32], *tmp; 160 160 int i, j, count; 161 161 char *arch_log; … … 172 172 if (date[j - 1] != UNDERSCORE) 173 173 date[j++] = UNDERSCORE; 174 if (conf->logs->unit && count == 3) 175 tmp = &char_time[i] + 1; 174 176 } 175 177 else if (count == 1 || count == 2 || count == 4) 176 178 { 177 179 date[j] = char_time[i]; 180 ++j; 181 } 182 } 183 if (conf->logs->unit) 184 { 185 count = 0; 186 date[j++] = '_'; 187 for (i = 0; i < 9; ++i) 188 { 189 date[j] = tmp[i]; 190 if (date[j] == ':') 191 { 192 if (count == 0) 193 date[j] = 'h'; 194 else if (count == 1) 195 date[j] = 'm'; 196 } 197 else if (date[j] == ' ') 198 date[j] = 's'; 178 199 ++j; 179 200 }
