Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions civics_cdf_spec.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,13 @@
<xs:element minOccurs="0" name="ExternalIdentifiers" type="ExternalIdentifiers" />
<xs:element name="Format" type="ReportDetailLevel" />
<xs:element name="GeneratedDate" type="xs:dateTime" />
<xs:element maxOccurs="1" minOccurs="0" name="GovernmentBodyCollection">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="GovernmentBody" type="GovernmentBody" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element maxOccurs="1" minOccurs="0" name="GpUnitCollection">
<xs:complexType>
<xs:sequence>
Expand Down Expand Up @@ -546,6 +553,7 @@
<xs:element minOccurs="0" name="ElectoralDistrictId" type="xs:IDREF" />
<xs:element minOccurs="0" name="ExternalIdentifiers" type="ExternalIdentifiers" />
<xs:element minOccurs="0" name="FilingDeadline" type="PartialDate" />
<xs:element minOccurs="0" name="GovernmentBodyIds" type="xs:IDREFS"/>
<xs:element minOccurs="0" name="IsPartisan" type="xs:boolean" />
<xs:element name="Name" type="InternationalizedText" />
<xs:element minOccurs="0" name="OfficeHolderPersonIds" type="xs:IDREFS" />
Expand Down Expand Up @@ -644,6 +652,14 @@
</xs:sequence>
<xs:attribute name="objectId" type="xs:ID" use="required" />
</xs:complexType>
<xs:complexType name="GovernmentBody">
<xs:sequence>
<xs:element minOccurs="0" name="ContactInformation" type="ContactInformation" />
<xs:element minOccurs="0" name="ExternalIdentifiers" type="ExternalIdentifiers"/>
<xs:element name="Name" type="InternationalizedText"/>
</xs:sequence>
<xs:attribute name="objectId" type="xs:ID" use="required"/>
</xs:complexType>
<xs:complexType name="ReportingDevice">
<xs:complexContent>
<xs:extension base="GpUnit">
Expand Down
4 changes: 2 additions & 2 deletions gpunit_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,9 +155,9 @@ def _get_ocd_data(self):
else:
if self.check_github:
last_mod_date = datetime.datetime.fromtimestamp(
os.path.getmtime(countries_filename))
os.path.getmtime(countries_filename), datetime.timezone.utc)

seconds_since_mod = (datetime.datetime.now() -
seconds_since_mod = (datetime.datetime.now(datetime.timezone.utc) -
last_mod_date).total_seconds()

# If 1 hour has elapsed, check GitHub for the last file update.
Expand Down
Loading