cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From weiz...@apache.org
Subject git commit: updated refs/heads/master to f012a26
Date Thu, 09 Jan 2014 13:08:08 GMT
Updated Branches:
  refs/heads/master d56a96244 -> f012a2655


CLOUDSTACK-5404: Fix timezone bug in network usage
(cherry picked from commit d5277a81e644c6db30cff12878cd3708aa28cc86)

Conflicts:

	engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/f012a265
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/f012a265
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/f012a265

Branch: refs/heads/master
Commit: f012a2655d38fb8aa0f9e6cb6ee740e89b12359d
Parents: d56a962
Author: Wei Zhou <w.zhou@leaseweb.com>
Authored: Thu Jan 9 14:07:53 2014 +0100
Committer: Wei Zhou <w.zhou@leaseweb.com>
Committed: Thu Jan 9 14:07:53 2014 +0100

----------------------------------------------------------------------
 engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f012a265/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
index 9582033..32f63e6 100644
--- a/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
+++ b/engine/schema/src/com/cloud/usage/dao/UsageDaoImpl.java
@@ -18,7 +18,6 @@ package com.cloud.usage.dao;
 
 import java.sql.PreparedStatement;
 import java.sql.ResultSet;
-import java.sql.Timestamp;
 import java.sql.Types;
 import java.util.ArrayList;
 import java.util.Date;
@@ -434,8 +433,8 @@ public class UsageDaoImpl extends GenericDaoBase<UsageVO, Long>
implements Usage
                 } else {
                     pstmt.setNull(15, Types.BIGINT);
                 }
-                pstmt.setTimestamp(16, new Timestamp(usageRecord.getStartDate().getTime()));
-                pstmt.setTimestamp(17, new Timestamp(usageRecord.getEndDate().getTime()));
+                pstmt.setString(16, DateUtil.getDateDisplayString(s_gmtTimeZone, usageRecord.getStartDate()));
+                pstmt.setString(17, DateUtil.getDateDisplayString(s_gmtTimeZone, usageRecord.getEndDate()));
                 if (usageRecord.getVirtualSize() != null) {
                     pstmt.setLong(18, usageRecord.getSize());
                 } else {


Mime
View raw message