From 8bbf2d3e68fe9746e5d39e3a500530942cf85afb Mon Sep 17 00:00:00 2001 From: Brian Chan Date: Mon, 14 Jul 2014 21:14:15 -0700 Subject: [PATCH] LPS-48534 Can we not use the default java system property? --- benchmarks/benchmarks.properties | 10 +++++----- .../portal/tools/samplesqlbuilder/DataFactory.java | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/benchmarks/benchmarks.properties b/benchmarks/benchmarks.properties index baa00ecfd22b26..7c00a3f4c8b9f2 100644 --- a/benchmarks/benchmarks.properties +++ b/benchmarks/benchmarks.properties @@ -16,6 +16,11 @@ sample.sql.asset.publisher.query.name=assetCategories #sample.sql.asset.publisher.query.name=assetTags + # + # Specify the time zone. + # + sample.sql.db.time.zone= + # # Specify the database type of the generated SQL files. # @@ -34,11 +39,6 @@ #sample.sql.db.type=sqlserver #sample.sql.db.type=sybase - # - # Specify the timezone is used to generate sql - # - sample.sql.db.timezone= - # # Specify the number of asset categories to generate per asset vocabulary. # diff --git a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java index 0f9ad856bf7d5f..8b5bceec1be2f0 100644 --- a/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java +++ b/portal-impl/src/com/liferay/portal/tools/samplesqlbuilder/DataFactory.java @@ -723,17 +723,17 @@ public void initCompanyModel() { } public void initContext(Properties properties) { - String timeZone = properties.getProperty("sample.sql.db.timezone"); + String timeZoneId = properties.getProperty("sample.sql.db.time.zone"); - if (Validator.isNotNull(timeZone)) { - TimeZone newTimeZone = TimeZone.getTimeZone(timeZone); + if (Validator.isNotNull(timeZoneId)) { + TimeZone timeZone = TimeZone.getTimeZone(timeZoneId); - if (newTimeZone != null) { - TimeZone.setDefault(newTimeZone); + if (timeZone != null) { + TimeZone.setDefault(timeZone); _simpleDateFormat = FastDateFormatFactoryUtil.getSimpleDateFormat( - "yyyy-MM-dd HH:mm:ss", newTimeZone); + "yyyy-MM-dd HH:mm:ss", timeZone); } }