1
0
mirror of https://github.com/interviewstreet/go-jira.git synced 2025-11-29 22:28:34 +02:00

Merge pull request #157 from oroshnivskyy/master

Add CreatedTime() (time.Time, error) func to ChangelogHistory
This commit is contained in:
rbriski
2018-09-12 12:30:26 -07:00
committed by GitHub
2 changed files with 42 additions and 0 deletions

View File

@@ -1107,3 +1107,13 @@ func (s *IssueService) UpdateAssignee(issueID string, assignee *User) (*Response
return resp, err
}
func (c ChangelogHistory) CreatedTime() (time.Time, error) {
var t time.Time
// Ignore null
if string(c.Created) == "null" {
return t, nil
}
t, err := time.Parse("2006-01-02T15:04:05.999-0700", c.Created)
return t, err
}