Also - assume the $year value is 2008. You have to subtract 1900 from that value first - ie., $year-=1900 or 108 in this case.
timegm will try to report a few extra days or hours, ie., March 32, 2008, but bad dates have the potential for bad results, so watch it. timegm is not that robust. It may create a completely bogus result.