From baa7229b2ad9788887e32c3b7c6d3367f65010b2 Mon Sep 17 00:00:00 2001 From: Johann Werner Date: Wed, 14 Nov 2012 08:59:24 +0100 Subject: [PATCH] use SimpleDateFormatter instead of deprecated NSTimestampFormatter --- .../com/webobjects/jdbcadaptor/PostgresqlExpression.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java b/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java index b749b318644..7d7cd6eab32 100644 --- a/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java +++ b/Frameworks/PlugIns/PostgresqlPlugIn/Sources/com/webobjects/jdbcadaptor/PostgresqlExpression.java @@ -4,6 +4,7 @@ import java.lang.reflect.Method; import java.math.BigDecimal; import java.sql.Timestamp; +import java.text.SimpleDateFormat; import java.util.Date; import java.util.Enumeration; @@ -24,7 +25,6 @@ import com.webobjects.foundation.NSMutableDictionary; import com.webobjects.foundation.NSSelector; import com.webobjects.foundation.NSTimestamp; -import com.webobjects.foundation.NSTimestampFormatter; import com.webobjects.foundation._NSStringUtilities; /** @@ -72,12 +72,12 @@ public class PostgresqlExpression extends JDBCExpression { /** * formatter to use when handling date columns */ - private static final NSTimestampFormatter DATE_FORMATTER = new NSTimestampFormatter("%Y-%m-%d"); + private static final SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd"); /** * formatter to use when handling timestamps */ - private static final NSTimestampFormatter TIMESTAMP_FORMATTER = new NSTimestampFormatter("%Y-%m-%d %H:%M:%S.%F"); + private static final SimpleDateFormat TIMESTAMP_FORMATTER = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); /** * Method to get the string value from a BigDecimals from.