diff --git a/java/google/registry/batch/ExpandRecurringBillingEventsAction.java b/java/google/registry/batch/ExpandRecurringBillingEventsAction.java index fc925974f..b3ce51257 100644 --- a/java/google/registry/batch/ExpandRecurringBillingEventsAction.java +++ b/java/google/registry/batch/ExpandRecurringBillingEventsAction.java @@ -67,7 +67,6 @@ import java.util.Set; import javax.inject.Inject; import org.joda.money.Money; import org.joda.time.DateTime; -import org.joda.time.DateTimeZone; /** * A mapreduce that expands {@link Recurring} billing events into synthetic {@link OneTime} events. @@ -192,7 +191,7 @@ public class ExpandRecurringBillingEventsAction implements Runnable { HistoryEntry historyEntry = new HistoryEntry.Builder() .setBySuperuser(false) .setClientId(recurring.getClientId()) - .setModificationTime(DateTime.now(DateTimeZone.UTC)) + .setModificationTime(ofy().getTransactionTime()) .setParent(domainKey) .setPeriod(Period.create(1, YEARS)) .setReason("Domain autorenewal by ExpandRecurringBillingEventsAction") diff --git a/java/google/registry/model/reporting/HistoryEntry.java b/java/google/registry/model/reporting/HistoryEntry.java index 2301dcc2b..2ee7a998f 100644 --- a/java/google/registry/model/reporting/HistoryEntry.java +++ b/java/google/registry/model/reporting/HistoryEntry.java @@ -104,7 +104,7 @@ public class HistoryEntry extends ImmutableObject implements Buildable { /** The actual EPP xml of the command, stored as bytes to be agnostic of encoding. */ byte[] xmlBytes; - /** The time the command occurred. */ + /** The time the command occurred, represented by the ofy transaction time.*/ @Index DateTime modificationTime; diff --git a/java/google/registry/rde/imports/XjcToHostResourceConverter.java b/java/google/registry/rde/imports/XjcToHostResourceConverter.java index 9a53c8353..aa85f3323 100644 --- a/java/google/registry/rde/imports/XjcToHostResourceConverter.java +++ b/java/google/registry/rde/imports/XjcToHostResourceConverter.java @@ -19,7 +19,6 @@ import static com.google.common.base.Predicates.not; import static google.registry.model.ofy.ObjectifyService.ofy; import static google.registry.rde.imports.RdeImportUtils.generateTridForImport; import static google.registry.util.DomainNameUtils.canonicalizeDomainName; -import static org.joda.time.DateTimeZone.UTC; import com.google.common.base.Function; import com.google.common.collect.FluentIterable; @@ -35,7 +34,6 @@ import google.registry.xjc.host.XjcHostStatusType; import google.registry.xjc.rdehost.XjcRdeHost; import google.registry.xjc.rdehost.XjcRdeHostElement; import java.net.InetAddress; -import org.joda.time.DateTime; /** Utility class that converts an {@link XjcRdeHost} into a {@link HostResource}. */ public class XjcToHostResourceConverter extends XjcToEppResourceConverter { @@ -66,7 +64,7 @@ public class XjcToHostResourceConverter extends XjcToEppResourceConverter { .setType(HistoryEntry.Type.RDE_IMPORT) .setClientId(host.getClID()) .setTrid(generateTridForImport()) - .setModificationTime(DateTime.now(UTC)) + .setModificationTime(ofy().getTransactionTime()) .setXmlBytes(getObjectXml(new XjcRdeHostElement(host))) .setBySuperuser(true) .setReason("RDE Import")