Revision: 271 http://mindtreeinsight.svn.sourceforge.net/mindtreeinsight/?rev=271&view=rev Author: bindul Date: 2011-01-26 05:42:46 +0000 (Wed, 26 Jan 2011)
Log Message: ----------- 3165687: Handled timezone formats as part of the date format Modified Paths: -------------- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java Modified: insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java =================================================================== --- insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java 2011-01-25 16:39:25 UTC (rev 270) +++ insight/insight-ui/branches/insight-ui-1.5.0/src/main/java/com/mindtree/techworks/insight/receiver/LogInterpreter.java 2011-01-26 05:42:46 UTC (rev 271) @@ -1,8 +1,8 @@ /* - * $HeadURL: $ - * $Date: $ - * $Revision: $ - * $Author: $ + * $HeadURL$ + * $Date$ + * $Revision$ + * $Author$ * * Copyright (c) 2005 MindTree Consulting Ltd. * @@ -173,7 +173,11 @@ /** * Date format */ - private static final String VALID_DATEFORMAT_CHAR_PATTERN = "[GyMwWDdFEaHkKhmsSzZ]"; + // Defect 2491873 the regular replacement of timezones with \w fails to + // recognize the data due to the presence of signs (like -7000 for Z in MST) + private static final String VALID_DATEFORMAT_CHAR_PATTERN = "[GyMwWDdFEaHkKhmsS]"; + + private static final String VALID_DATEFORMAT_CHAR_PATTERN_TZ = "[zZ]"; /** * Property start @@ -560,8 +564,10 @@ String timestampFormat = receiverFormat.getTimeStampPattern() == null ? TIMESTAMP_FORMAT : receiverFormat.getTimeStampPattern(); - return util.substitute("s/" + VALID_DATEFORMAT_CHAR_PATTERN + String convertedPattern = util.substitute("s/" + VALID_DATEFORMAT_CHAR_PATTERN + "/\\\\w/g", timestampFormat); + convertedPattern = util.substitute("s/" + VALID_DATEFORMAT_CHAR_PATTERN_TZ + "/./g", convertedPattern); + return convertedPattern; } /** This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ MindTreeInsight-commits mailing list MindTreeInsight-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mindtreeinsight-commits