[tz] strftime and nonnormalized dates/times

Robert Elz kre at munnari.OZ.AU
Tue Jul 3 02:58:08 UTC 2018

    Date:        Mon, 02 Jul 2018 22:13:51 -0400
    From:        scs at eskimo.com (Steve Summit)
    Message-ID:  <2018Jul02.2213.scs.0001 at quinine.home>

  | But if strftime doesn't restrict the ranges of the various struct
  | tm fields to their "normal" values, it makes me wonder how much
  | latitude a push-the-boundaries programmer actually has when
  | calling strftime.  Are the values as unlimited as they are when
  | calling, say, mktime?

What POSIX says is:

	If any of the specified values are outside the normal range,
	the characters stored are unspecified.

which means that if you provide a value for tm_hour outside the 0..23
range, what happens is anyone's guess (and you cannot complain.)


More information about the tz mailing list