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); } }