Compare commits
2 Commits
726100b6a5
...
d328d47859
| Author | SHA1 | Date | |
|---|---|---|---|
| d328d47859 | |||
| 39f32d02f9 |
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@teacinema/common",
|
||||
"version": "1.2.0",
|
||||
"version": "1.3.0",
|
||||
"description": "Common library for TeaCinema microservices",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
||||
@ -1 +1,2 @@
|
||||
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