Absolutely didn't like negative values for tm_wday and tm_mon before.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7327 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
50b3e5d4ce
commit
192f207c78
@ -22,7 +22,8 @@ print_time(char *buffer, size_t bufferSize, const struct tm *tm)
|
||||
};
|
||||
|
||||
snprintf(buffer, bufferSize, "%.3s %.3s%3d %02d:%02d:%02d %d\n",
|
||||
weekdays[tm->tm_wday % 7], months[tm->tm_mon % 12],
|
||||
tm->tm_wday < 0 ? "???" : weekdays[tm->tm_wday % 7],
|
||||
tm->tm_mon < 0 ? "???" : months[tm->tm_mon % 12],
|
||||
tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec,
|
||||
1900 + tm->tm_year);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user