First problem: you are not trying to read "Tue" in the line. (Add "EEE" at the beginning of your format)
The second and biggest problem: +0580 is not a valid time zone. A few years ago there was a PHP error that mistakenly returned IST (+0530) as +0580. 0580 does not make sense. This means 5 hours and 80 minutes. Thus, you can do one of two things: either replace +0580 with +0530 before processing it , or set the formatting date time zone to IST and remove +0580 from the line.
I see that you accepted a different answer, but this answer "works" because it cannot analyze the final part and ignore the time zone. I ran it and got 2013-07-09 08:32:38 +0000 (which does not match 2013-07-09 08:32:39 +0580 )
Deleting + in the accepted response format causes the formatting to be parsed correctly, but you will get null because the time zone is invalid. Changing the time zone to +0530 gives the expected result 2013-07-09 03:02:39 +0000
source share