Am 18.07.2016 17:50, schrieb Thomas Osterried:
> Thank you for your comment.
> 
>> my i asc why you use strcpy/ctime in the first place ?
> 
> It's old code, written abt 20-25 years ago.
> 
>>      strftime(lh, sizeof(lh),"%Y-%m-%d %H:%M:%S",tm);
> 
> Yes, it's nicer than "Thu Jul 14 19:08:49 2016", and more economic to read.
> I hope such a change would not break any script users may have written
> during the last decades.
> 


Of cause you can also use the pattern for ctime() but so its more easy to get
rid of unwanted artifacts. (i have actually seem code where people parsed the
output of ctime()). One #ifdef can get you the old pattern back.

note:
 instead of using mktime() you can use gmtime() and avoid funny effects with 
time zones.

re,
 wh


--
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to