From 43ec7314a783d7003e5b434eef05cd0e5384ff7f Mon Sep 17 00:00:00 2001 From: Alex Erling Date: Wed, 25 Apr 2018 15:13:42 -0500 Subject: [PATCH] Fixed Git history to show the correct date and fixed some typos. Signed-off-by: Alex Erling Fixed semi colon error. Signed-off-by: Alex Erling --- packages/git/src/browser/history/git-history-widget.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/git/src/browser/history/git-history-widget.ts b/packages/git/src/browser/history/git-history-widget.ts index c4c4b391fda55..da57a68adce67 100644 --- a/packages/git/src/browser/history/git-history-widget.ts +++ b/packages/git/src/browser/history/git-history-widget.ts @@ -49,7 +49,7 @@ export class GitHistoryWidget extends GitNavigableListWidget @inject(ApplicationShell) protected readonly shell: ApplicationShell, @inject(FileSystem) protected readonly fileSystem: FileSystem, @inject(Git) protected readonly git: Git, - @inject(GitAvatarService) protected readonly avartarService: GitAvatarService, + @inject(GitAvatarService) protected readonly avatarService: GitAvatarService, @inject(WidgetManager) protected readonly widgetManager: WidgetManager, @inject(GitDiffContribution) protected readonly diffContribution: GitDiffContribution) { super(); @@ -107,10 +107,12 @@ export class GitHistoryWidget extends GitNavigableListWidget const commits: GitCommitNode[] = []; for (const commit of changes) { const fileChangeNodes: GitFileChangeNode[] = []; - const avatarUrl = await this.avartarService.getAvatar(commit.author.email); + const avatarUrl = await this.avatarService.getAvatar(commit.author.email); + const authorDate = new Date(commit.author.timestamp); + authorDate.setUTCSeconds(commit.author.timestamp); commits.push({ authorName: commit.author.name, - authorDate: new Date(commit.author.timestamp), + authorDate, authorEmail: commit.author.email, authorDateRelative: commit.authorDateRelative, authorAvatar: avatarUrl,