On Tue, Apr 20, 2021 at 11:44:06AM +0200, Lars Munch wrote:
> tm_isdst needs to be initialized to make sure mktime does not fail
> or calculates the wrong time.

No, take a look at the mktime(3) man page.  There you will read the
following.

       The  mktime() function modifies the fields of the tm structure as fol‐
       lows: tm_wday and tm_yday are set to values determined from  the  con‐
       tents  of  the  other  fields;  if structure members are outside their
       valid interval, they will be normalized (so that, for example, 40  Oc‐
       tober  is changed into 9 November); tm_isdst is set (regardless of its
       initial value) to a positive value or to 0, respectively, to  indicate
       whether DST is or is not in effect at the specified time.

Thanks,
Richard


_______________________________________________
Linuxptp-devel mailing list
Linuxptp-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linuxptp-devel

Reply via email to