{
static char str[MAXSTR];
struct tm local, *utc;
- time_t t;
/* Replay date/time is stored as UTC. The code below computes the actual
* local time. Needless to say, this is an ugly hack...
local.tm_min += local.tm_min - utc->tm_min ;
local.tm_sec += local.tm_sec - utc->tm_sec ;
- /* Normalize the values if they've gotten out of range. */
+ /* Normalize values. */
+ i = mktime(&local);
- t = mktime(&local);
+ strftime(str, MAXSTR, "%c", localtime(&i));
- strftime(str, MAXSTR, "%c", localtime(&t));
return str;
}