mirror of
https://github.com/google/nomulus.git
synced 2025-07-03 01:33:29 +02:00
Migrate invoicing pipeline to read from Cloud SQL (#1220)
* Save entities to Cloud SQL for tests * Fix merge conflict * Filter out non-real registrars and non-invoicing TLDs * Add 1 month filter * Handle cancellations * Add to pipeline * Use database in pipeline * fix formatting * Add a full pipeline test * Fix repo ids in tests * Move query to separate file * Remove unused variables * Remove unnecessary debugging remnant * Reformat sql file * Add jpql issue description * Use DateTimeUtils * Fix license header year * Fix SQL formatting * Use regex pattern * Fix string building * Add test for makeCloudSqlQuery * Add clarifying comment
This commit is contained in:
parent
6670aa04eb
commit
c7d44a0ee4
8 changed files with 531 additions and 27 deletions
|
@ -100,6 +100,15 @@ public class DateTimeUtils {
|
|||
return ZonedDateTime.ofInstant(instant, ZoneId.of(dateTime.getZone().getID()).normalized());
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a Joda {@link DateTime} object to an equivalent java.time {@link ZonedDateTime}
|
||||
* object.
|
||||
*/
|
||||
public static ZonedDateTime toZonedDateTime(DateTime dateTime, ZoneId zoneId) {
|
||||
java.time.Instant instant = java.time.Instant.ofEpochMilli(dateTime.getMillis());
|
||||
return ZonedDateTime.ofInstant(instant, zoneId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a java.time {@link ZonedDateTime} object to an equivalent Joda {@link DateTime}
|
||||
* object.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue