feat: add timestamp to iso
This commit is contained in:
parent
726100b6a5
commit
39f32d02f9
@ -1 +1,2 @@
|
|||||||
export * from './convert-enum.util'
|
export * from './convert-enum.util'
|
||||||
|
export * from './timestamp-to-iso.util'
|
||||||
|
|||||||
5
src/lib/utils/timestamp-to-iso.util.ts
Normal file
5
src/lib/utils/timestamp-to-iso.util.ts
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import { Timestamp } from '@teacinema/contracts/gen/ts/google/protobuf/timestamp'
|
||||||
|
|
||||||
|
export function timestampToISO(ts: Timestamp) {
|
||||||
|
new Date(ts.seconds * 1000 + ts.nanos / 1_000_000).toISOString()
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user