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:
10
issue.go
10
issue.go
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user