Skip to content

Commit

Permalink
fix: strip milliseconds from dateTime strings (decentralized-identity…
Browse files Browse the repository at this point in the history
  • Loading branch information
mirceanis committed Apr 23, 2021
1 parent 39f786e commit 3e958af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/__tests__/networks.integration.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ describe('ethrResolver (alt-chains)', () => {
expect(result).toEqual({
didDocumentMetadata: {
nextVersionId: '12090175',
nextUpdate: '2021-03-22T18:14:29.000Z',
nextUpdate: '2021-03-22T18:14:29Z',
},
didResolutionMetadata: {
contentType: 'application/did+ld+json',
Expand Down
2 changes: 1 addition & 1 deletion src/resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class EthrDidResolver {
const block: Block = await this.contracts[networkId].provider.getBlock(blockHeight)
return {
height: block.number.toString(),
isoDate: new Date(block.timestamp * 1000).toISOString(),
isoDate: new Date(block.timestamp * 1000).toISOString().replace('.000', ''),
}
}

Expand Down

0 comments on commit 3e958af

Please sign in to comment.