Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
yuth committed Sep 24, 2019
1 parent 7a8dada commit 6ccbbab
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/amplify-appsync-simulator/src/velocity/util/time.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ declare module 'moment' {
}
}

function parseTimeStamp(dateTime: string, format?: string, timezone?: string): moment.Moment {
const parseTimestamp = (dateTime: string, format?: string, timezone?: string): moment.Moment => {
if (!dateTime || !format) {
return null;
}
Expand Down Expand Up @@ -52,11 +52,11 @@ export const time = () => ({
format: string,
timezone?: string
): number | null {
const timestamp = parseTimeStamp(dateTime, format, timezone);
const timestamp = parseTimestamp(dateTime, format, timezone);
return timestamp ? timestamp.valueOf() : null;
},
parseISO8601ToEpochMilliSeconds(dateTime): number | null {
const timestamp = parseTimeStamp(dateTime, 'YYYY-MM-DDTHH:mm:ss.SZ');
const timestamp = parseTimestamp(dateTime, 'YYYY-MM-DDTHH:mm:ss.SZ');
return timestamp ? timestamp.valueOf() : null;
},
epochMilliSecondsToSeconds(milliseconds: number): number | null {
Expand Down

0 comments on commit 6ccbbab

Please sign in to comment.