feat: add timestamp to iso

This commit is contained in:
Sergey Krylov 2026-04-12 08:30:08 +03:00
parent 726100b6a5
commit 39f32d02f9
2 changed files with 6 additions and 0 deletions

View File

@ -1 +1,2 @@
export * from './convert-enum.util'
export * from './timestamp-to-iso.util'

View 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()
}