Skip to content

Commit

Permalink
junction: fix DateTime truncation issue in BlockingState mapper
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Alexandre Meyer <pierre@ning.com>
  • Loading branch information
Pierre-Alexandre Meyer committed Oct 6, 2012
1 parent f0e3a01 commit a0fdf43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public BlockingState map(final int index, final ResultSet r, final StatementCont
final boolean blockBilling;
final Type type;
try {
timestamp = new DateTime(r.getDate("created_date"));
timestamp = getDateTime(r, "created_date");
blockableId = UUID.fromString(r.getString("id"));
stateName = r.getString("state") == null ? BlockingApi.CLEAR_STATE_NAME : r.getString("state");
type = Type.get(r.getString("type"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public Void withHandle(final Handle handle) throws Exception {
}
});

final BlockingState blockingState = new DefaultBlockingState(bundleId, "BLOCKED", Type.SUBSCRIPTION_BUNDLE, "myService", true, true, true, clock.getUTCToday().toDateTimeAtStartOfDay());
final BlockingState blockingState = new DefaultBlockingState(bundleId, "BLOCKED", Type.SUBSCRIPTION_BUNDLE, "myService", true, true, true, clock.getUTCNow());
blockingApi.setBlockingState(blockingState, callContext);

// Verify the blocking state was applied
Expand Down

0 comments on commit a0fdf43

Please sign in to comment.