Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6DEFD104E1 for ; Fri, 2 Jan 2015 07:22:13 +0000 (UTC) Received: (qmail 4802 invoked by uid 500); 2 Jan 2015 07:22:13 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 4705 invoked by uid 500); 2 Jan 2015 07:22:13 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 4693 invoked by uid 99); 2 Jan 2015 07:22:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jan 2015 07:22:13 +0000 Date: Fri, 2 Jan 2015 07:22:13 +0000 (UTC) From: "Shweta Turakhia (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (LANG-1061) FastDateParser error - timezone followed by year MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/LANG-1061?page=3Dcom.atlassian.= jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D14262= 770#comment-14262770 ]=20 Shweta Turakhia edited comment on LANG-1061 at 1/2/15 7:22 AM: --------------------------------------------------------------- Thanks Sebb.=20 Regarding the first comment, I will change it to=20 [+\\-]\\d{4} But instead of \\d{0,1}\\d{2}:?\\d{2} =3D> \\d{2,3}:?\\d{2} I think the change should be=20 \\d{0,1}\\d{2}:?\\d{2} =3D> \\d{1,2}:?\\d{2} =20 As SimpleDateFormat also does not support the 3 digits before the colon. Pl= ease let me know what you think. was (Author: sturakhia): Thanks Sebb.=20 Regarding the first comment, I will change it to=20 [+\\-]\\d{4} But instead of \\d{0,1}\\d{2} =3D> \\d{2,3} I think the change should be=20 \\d{0,1}\\d{2} =3D> \\d{1,2}:?\\d{2} =20 As SimpleDateFormat also does not support the 3 digits before the colon. > FastDateParser error - timezone followed by year > ------------------------------------------------ > > Key: LANG-1061 > URL: https://issues.apache.org/jira/browse/LANG-1061 > Project: Commons Lang > Issue Type: Bug > Components: lang.time.* > Affects Versions: 3.3.2 > Reporter: dmeneses > Attachments: 0001-https-issues.apache.org-jira-browse-LANG-1061-F= astDa.patch > > > The following code throws an exception: > DateParser dp =3D FastDateFormat.getInstance("z yyyy", Locale.US); > dp.parse("GMT+00:00 2010"); > The format works correctly with SimpleDateFormat. > Stack: > java.text.ParseException: Unparseable date: "GMT+00:00 2010" does not mat= ch (GMT[+\-]\d{0,1}\d{2}|[+\-]\d{2}:?\d{2}|\QAcre Time\E|\QACT\E|\QADT\E|\Q= Afghanistan Time\E|\QAFT\E|\QAKDT\E|\QAKST\E|\QAlaska Daylight Time\E|\QAla= ska Standard Time\E|\QAlma-Ata Time\E|\QALMT\E|\QAmazon Summer Time\E|\QAma= zon Time\E|\QAMST\E|\QAMT\E|\QAnadyr Time\E|\QANAT\E|\QAqtau Time\E|\QAqtob= e Time\E|\QAQTT\E|\QArabia Standard Time\E|\QArgentine Time\E|\QArmenia Tim= e\E|\QART\E|\QAST\E|\QAtlantic Daylight Time\E|\QAtlantic Standard Time\E|\= QAzerbaijan Summer Time\E|\QAzerbaijan Time\E|\QAzores Summer Time\E|\QAzor= es Time\E|\QAZOST\E|\QAZOT\E|\QAZST\E|\QAZT\E|\QBangladesh Time\E|\QBDT\E|\= QBhutan Time\E|\QBNT\E|\QBolivia Time\E|\QBOT\E|\QBrasilia Summer Time\E|\Q= Brasilia Time\E|\QBritish Summer Time\E|\QBRST\E|\QBRT\E|\QBrunei Time\E|\Q= BST\E|\QBTT\E|\QCape Verde Time\E|\QCAT\E|\QCCT\E|\QCDT\E|\QCentral African= Time\E|\QCentral Daylight Time\E|\QCentral European Summer Time\E|\QCentra= l European Time\E|\QCentral Indonesia Time\E|\QCentral Standard Time\E|\QCe= ntral Standard Time (Northern Territory)\E|\QCentral Standard Time (South A= ustralia)\E|\QCentral Standard Time (South Australia/New South Wales)\E|\QC= entral Summer Time (South Australia)\E|\QCentral Summer Time (South Austral= ia/New South Wales)\E|\QCentral Western Standard Time (Australia)\E|\QCEST\= E|\QCET\E|\QCHADT\E|\QChamorro Standard Time\E|\QCHAST\E|\QChatham Daylight= Time\E|\QChatham Standard Time\E|\QChile Summer Time\E|\QChile Time\E|\QCh= ina Standard Time\E|\QChoibalsan Time\E|\QCHOT\E|\QChristmas Island Time\E|= \QChST\E|\QCHUT\E|\QChuuk Time\E|\QCKT\E|\QCLST\E|\QCLT\E|\QCocos Islands T= ime\E|\QColombia Time\E|\QCook Is. Time\E|\QCoordinated Universal Time\E|\Q= COT\E|\QCST\E|\QCuba Daylight Time\E|\QCuba Standard Time\E|\QCVT\E|\QCWST\= E|\QCXT\E|\QDavis Time\E|\QDAVT\E|\QDDUT\E|\QDumont-d'Urville Time\E|\QEASS= T\E|\QEAST\E|\QEast Indonesia Time\E|\QEaster Is. Summer Time\E|\QEaster Is= . Time\E|\QEastern African Time\E|\QEastern Daylight Time\E|\QEastern Europ= ean Summer Time\E|\QEastern European Time\E|\QEastern Greenland Summer Time= \E|\QEastern Greenland Time\E|\QEastern Standard Time\E|\QEastern Standard = Time (New South Wales)\E|\QEastern Standard Time (Queensland)\E|\QEastern S= tandard Time (Tasmania)\E|\QEastern Standard Time (Victoria)\E|\QEastern Su= mmer Time (New South Wales)\E|\QEastern Summer Time (Tasmania)\E|\QEastern = Summer Time (Victoria)\E|\QEAT\E|\QECT\E|\QEcuador Time\E|\QEDT\E|\QEEST\E|= \QEET\E|\QEGST\E|\QEGT\E|\QEST\E|\QFalkland Is. Time\E|\QFernando de Noronh= a Time\E|\QFET\E|\QFiji Summer Time\E|\QFiji Time\E|\QFJST\E|\QFJT\E|\QFKT\= E|\QFNT\E|\QFrench Guiana Time\E|\QFrench Southern & Antarctic Lands Time\E= |\QFurther-eastern European Time\E|\QGalapagos Time\E|\QGALT\E|\QGambier Ti= me\E|\QGAMT\E|\QGeorgia Time\E|\QGET\E|\QGFT\E|\QGhana Mean Time\E|\QGilber= t Is. Time\E|\QGILT\E|\QGMT\E|\QGreenwich Mean Time\E|\QGST\E|\QGulf Standa= rd Time\E|\QGuyana Time\E|\QGYT\E|\QHADT\E|\QHAST\E|\QHawaii Standard Time\= E|\QHawaii-Aleutian Daylight Time\E|\QHawaii-Aleutian Standard Time\E|\QHKT= \E|\QHong Kong Time\E|\QHovd Time\E|\QHOVT\E|\QHST\E|\QICT\E|\QIDT\E|\QIndi= a Standard Time\E|\QIndian Ocean Territory Time\E|\QIndochina Time\E|\QIOT\= E|\QIran Daylight Time\E|\QIran Standard Time\E|\QIRDT\E|\QIrish Summer Tim= e\E|\QIRKT\E|\QIrkutsk Time\E|\QIRST\E|\QIsrael Daylight Time\E|\QIsrael St= andard Time\E|\QIST\E|\QJapan Standard Time\E|\QJST\E|\QKGT\E|\QKhandyga Ti= me\E|\QKirgizstan Time\E|\QKorea Standard Time\E|\QKosrae Time\E|\QKOST\E|\= QKrasnoyarsk Time\E|\QKRAT\E|\QKST\E|\QLHST\E|\QLine Is. Time\E|\QLINT\E|\Q= Lord Howe Standard Time\E|\QLord Howe Summer Time\E|\QMacquarie Island Time= \E|\QMagadan Time\E|\QMAGT\E|\QMalaysia Time\E|\QMaldives Time\E|\QMarquesa= s Time\E|\QMarshall Islands Time\E|\QMART\E|\QMauritius Time\E|\QMawson Tim= e\E|\QMAWT\E|\QMDT\E|\QMeST\E|\QMET\E|\QMetlakatla Standard Time\E|\QMHT\E|= \QMiddle Europe Summer Time\E|\QMiddle Europe Time\E|\QMIST\E|\QMMT\E|\QMos= cow Standard Time\E|\QMountain Daylight Time\E|\QMountain Standard Time\E|\= QMSK\E|\QMST\E|\QMUT\E|\QMVT\E|\QMyanmar Time\E|\QMYT\E|\QNauru Time\E|\QNC= T\E|\QNDT\E|\QNepal Time\E|\QNew Caledonia Time\E|\QNew Zealand Daylight Ti= me\E|\QNew Zealand Standard Time\E|\QNewfoundland Daylight Time\E|\QNewfoun= dland Standard Time\E|\QNFT\E|\QNiue Time\E|\QNorfolk Time\E|\QNovosibirsk = Time\E|\QNOVT\E|\QNPT\E|\QNRT\E|\QNST\E|\QNUT\E|\QNZDT\E|\QNZST\E|\QOmsk Ti= me\E|\QOMST\E|\QOral Time\E|\QORAT\E|\QPacific Daylight Time\E|\QPacific St= andard Time\E|\QPakistan Time\E|\QPalau Time\E|\QPapua New Guinea Time\E|\Q= Paraguay Summer Time\E|\QParaguay Time\E|\QPDT\E|\QPeru Time\E|\QPET\E|\QPe= tropavlovsk-Kamchatski Time\E|\QPETT\E|\QPGT\E|\QPhilippines Time\E|\QPhoen= ix Is. Time\E|\QPHOT\E|\QPHT\E|\QPierre & Miquelon Daylight Time\E|\QPierre= & Miquelon Standard Time\E|\QPitcairn Standard Time\E|\QPKT\E|\QPMDT\E|\QP= MST\E|\QPohnpei Time\E|\QPONT\E|\QPST\E|\QPWT\E|\QPYST\E|\QPYT\E|\QQYZT\E|\= QQyzylorda Time\E|\QRET\E|\QReunion Time\E|\QRothera Time\E|\QROTT\E|\QSakh= alin Time\E|\QSAKT\E|\QSamara Time\E|\QSamoa Standard Time\E|\QSAMT\E|\QSAS= T\E|\QSBT\E|\QSCT\E|\QSeychelles Time\E|\QSGT\E|\QSingapore Time\E|\QSolomo= n Is. Time\E|\QSouth Africa Standard Time\E|\QSouth Georgia Standard Time\E= |\QSRT\E|\QSST\E|\QSuriname Time\E|\QSYOT\E|\QSyowa Time\E|\QTahiti Time\E|= \QTAHT\E|\QTajikistan Time\E|\QTFT\E|\QTimor-Leste Time\E|\QTJT\E|\QTKT\E|\= QTLT\E|\QTMT\E|\QTokelau Time\E|\QTonga Time\E|\QTOT\E|\QTurkmenistan Time\= E|\QTuvalu Time\E|\QTVT\E|\QUlaanbaatar Time\E|\QULAT\E|\QUruguay Summer Ti= me\E|\QUruguay Time\E|\QUst-Nera Time\E|\QUTC\E|\QUYST\E|\QUYT\E|\QUzbekist= an Time\E|\QUZT\E|\QVanuatu Time\E|\QVenezuela Time\E|\QVET\E|\QVladivostok= Time\E|\QVLAT\E|\QVolgograd Time\E|\QVOLT\E|\QVOST\E|\QVostok Time\E|\QVUT= \E|\QWake Time\E|\QWAKT\E|\QWallis & Futuna Time\E|\QWAST\E|\QWAT\E|\QWEST\= E|\QWest Indonesia Time\E|\QWest Samoa Daylight Time\E|\QWest Samoa Time\E|= \QWestern African Summer Time\E|\QWestern African Time\E|\QWestern European= Summer Time\E|\QWestern European Time\E|\QWestern Greenland Summer Time\E|= \QWestern Greenland Time\E|\QWestern Standard Time (Australia)\E|\QWET\E|\Q= WFT\E|\QWGST\E|\QWGT\E|\QWIB\E|\QWIT\E|\QWITA\E|\QWSDT\E|\QWST\E|\QYAKT\E|\= QYakutsk Time\E|\QYekaterinburg Time\E|\QYEKT\E)\Q \E(\p{Nd}++) > =09at org.apache.commons.lang3.time.FastDateParser.parse(FastDateParser.j= ava:289) > =09at org.apache.commons.lang3.time.FastDateFormat.parse(FastDateFormat.j= ava:487) -- This message was sent by Atlassian JIRA (v6.3.4#6332)