in reply to timegm: There is no August, 31 in 2009

See Time::Local, emphasis by me:

It is worth drawing particular attention to the expected ranges for the values provided. The value for the day of the month is the actual day (ie 1..31), while the month is the number of months since January (0..11). This is consistent with the values returned from localtime() and gmtime().
  • Comment on Re: timegm: There is no August, 31 in 2009