Mistři v programování na #hovnokod

Visual Basic #4043

I don't want to live on this planet anymore..

   Call Loguj(3, "PUBDATE: Neni klasicky format: [" & strLog & "] original [" & strOrigPubDate & "]" & ex.Message, strAktualRSS)
                            'Fri, 17 Jun 2011 10:28:00 GMT
                            Try
                                pubDate = DateTime.ParseExact(strLog, "ddd, dd MMM yyyy HH:mm:ss zzz", System.Globalization.DateTimeFormatInfo.InvariantInfo, Globalization.DateTimeStyles.None)
                                Call Loguj(3, "PUBDATE: OK TRANSFORM : [" & strLog & "] -> [" & pubDate.ToString & "]", strAktualRSS)

                            Catch ex2 As Exception
                                Try
                                    pubDate = DateTime.ParseExact(strLog, "ddd, d MMM yyyy H:mm:ss GMT", System.Globalization.DateTimeFormatInfo.InvariantInfo, Globalization.DateTimeStyles.None)
                                    Call Loguj(3, "PUBDATE: OK TRANSFORM : [" & strLog & "] -> [" & pubDate.ToString & "]", strAktualRSS)

                                Catch ex3 As Exception
                                    Try
                                        pubDate = DateTime.ParseExact(strLog, "yyyy-MM-ddTHH:mm:ssK", System.Globalization.DateTimeFormatInfo.InvariantInfo, Globalization.DateTimeStyles.AllowLeadingWhite)
                                        Call Loguj(3, "PUBDATE: OK TRANSFORM : [" & strLog & "] -> [" & pubDate.ToString & "]", strAktualRSS)
....................
Catch ex42 As Exception
Try
pubDate = DateTime.ParseExact(strLog, "ddd dd MMM yyyy H:mm:ss CST", System.Globalization.DateTimeFormatInfo.InvariantInfo, Globalization.DateTimeStyles.None)
Call Loguj(3, "PUBDATE: OK TRANSFORM : [" & strLog & "] -> [" & pubDate.ToString & "]", strAktualRSS)

Catch ex44 As Exception
Call Loguj(1, "PUBDATE: NEZNAMY FORMAT : [" & strLog & "] [" & strOrigPubDate & "]" & ex44.Message, strAktualRSS)
pubDate = DateAdd(DateInterval.Hour, -4, Now())
intPubDateOk = 0

End Try
End Try
End Try
..........
End Try
End Try

Anonymous,