- strftime(buf, 80, "%a, %b %d, %Y, %k:%M", gmtime(&dive->when));
+ tm = gmtime(&dive->when);
+ snprintf(buf, sizeof(buf),
+ "%s, %s %d, %d %2d:%02d",
+ weekday(tm->tm_wday),
+ monthname(tm->tm_mon),
+ tm->tm_mday, tm->tm_year + 1900,
+ tm->tm_hour, tm->tm_min);
+