rem: _tm = localtime(&_trp->dtstart); _trp->ts.tm_sec = _tm->tm_sec;        _trp->ts.tm_min = _tm->tm_min;        _trp->ts.tm_hour = _tm->tm_hour;      _trp->ts.tm_mday = _tm->tm_mday;      _trp->ts.tm_mon = _tm->tm_mon;        _trp->ts.tm_year = _tm->tm_year;      _trp->ts.tm_wday = _tm->tm_wday;      _trp->ts.tm_yday = _tm->tm_yday;      _trp->ts.tm_isdst = _tm->tm_isdst;
add: localtime_r(&_trp->dtstart,&(_trp->ts));
context: tmrec_p tmrec_new(){	tmrec_p _trp = NULL;	struct tm *_tm;	_trp = (tmrec_p)pkg_malloc(sizeof(tmrec_t));	if(!_trp)		return NULL;	memset(_trp, 0, sizeof(tmrec_t));		_tm = localtime(&_trp->dtstart);	_trp->ts.tm_sec = _tm->tm_sec;       /* seconds */	_trp->ts.tm_min = _tm->tm_min;       /* minutes */	_trp->ts.tm_hour = _tm->tm_hour;     /* hours */	_trp->ts.tm_mday = _tm->tm_mday;     /* day of the month */	_trp->ts.tm_mon = _tm->tm_mon;       /* month */	_trp->ts.tm_year = _tm->tm_year;     /* year */	_trp->ts.tm_wday = _tm->tm_wday;     /* day of the week */	_trp->ts.tm_yday = _tm->tm_yday;     /* day in the year */	_trp->ts.tm_isdst = _tm->tm_isdst;   /* daylight saving time */		return _trp;}