MCPcopy Create free account
hub / github.com/bytebase/bytebase / getTimeForPbTimestampProtoEs

Function getTimeForPbTimestampProtoEs

frontend/src/types/timestamp.ts:4–12  ·  view source on GitHub ↗
(
  timestamp?: TimestampProtoEs,
  defaultValue = Date.now()
)

Source from the content-addressed store, hash-verified

2
3// Helper functions for proto-es timestamps (which use bigint for seconds)
4export const getTimeForPbTimestampProtoEs = (
5 timestamp?: TimestampProtoEs,
6 defaultValue = Date.now()
7): number => {
8 if (!timestamp) {
9 return defaultValue;
10 }
11 return Number(timestamp.seconds) * 1000 + timestamp.nanos / 1000000;
12};
13
14export const getDateForPbTimestampProtoEs = (
15 timestamp?: TimestampProtoEs

Callers 15

IssueTable.tsxFile · 0.90
IssueCommentHeaderFunction · 0.90
RevisionDetailPanelFunction · 0.90
createWorkspaceSliceFunction · 0.90
PlanRowFunction · 0.90
ProjectReleaseDetailPageFunction · 0.90
ReleaseRowFunction · 0.90
AccessGrantRowFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected