Repository: google/go-github
Pull request #2646 (2023-01-26 11:52:43)

Change all fields from time.Time to github.Timestamp
This PR introduces breaking API changes as described here #2645 
It also fix the related test for the breaking API changes

codecov[bot]: # [Codecov](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) Report
> Merging [#2646](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (ea39e12) into [master](https://codecov.io/gh/google/go-github/commit/36c47d1622e2a6f1544bddf0a9f62d4eafd3afa6?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) (36c47d1) will **increase** coverage by `0.00%`.
> The diff coverage is `100.00%`.

```diff
@@           Coverage Diff           @@
##           master    #2646   +/-   ##
=======================================
  Coverage   98.05%   98.05%           
=======================================
  Files         130      130           
  Lines       11242    11244    +2     
=======================================
+ Hits        11023    11025    +2     
  Misses        150      150           
  Partials       69       69           
```


| [Impacted Files](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) | Coverage Δ | |
|---|---|---|
| [github/apps.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2FwcHMuZ28=) | `95.16% <ø> (ø)` | |
| [github/event.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2V2ZW50Lmdv) | `100.00% <ø> (ø)` | |
| [github/gists.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2dpc3RzLmdv) | `96.68% <ø> (ø)` | |
| [github/gists\_comments.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2dpc3RzX2NvbW1lbnRzLmdv) | `100.00% <ø> (ø)` | |
| [github/git\_commits.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2dpdF9jb21taXRzLmdv) | `100.00% <ø> (ø)` | |
| [github/issues.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2lzc3Vlcy5nbw==) | `97.41% <ø> (ø)` | |
| [github/issues\_comments.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2lzc3Vlc19jb21tZW50cy5nbw==) | `100.00% <ø> (ø)` | |
| [github/issues\_events.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2lzc3Vlc19ldmVudHMuZ28=) | `100.00% <ø> (ø)` | |
| [github/issues\_milestones.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2lzc3Vlc19taWxlc3RvbmVzLmdv) | `100.00% <ø> (ø)` | |
| [github/issues\_timeline.go](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google#diff-Z2l0aHViL2lzc3Vlc190aW1lbGluZS5nbw==) | `100.00% <ø> (ø)` | |
| ... and [13 more](https://codecov.io/gh/google/go-github/pull/2646?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google) | |

Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=google)

gmlewis: @willnorris - this is a significant breaking change affecting a large number of fields.

Personally, I'm fine with it, but before we make such a sweeping change, I'd like to make sure you are fine with this too.
willnorris: In general, I don't really love moving away from standard Go types where it's not actually necessary.  It makes it harder to interop with other libraries and existing code.  In hindsight, I kinda wonder if we could have made Timestamp a time.Time rather than a struct containing a Time.  (`type Timestamp time.Time`) But whatever, that ship has long sailed.

It looks like `github.Timestamp` was introduced in c6d364f065a1d24973bfb9b94542b6e4ab29a725 for timestamps in the repo struct.  It looks like we're already using `github.Timestamp` quite a bit in the library, though I'm curious how much of that is actually needing to parse unix timestamps versus just doing what other parts of the library are doing.  At the end of the day, I guess it probably doesn't matter too much.

Given that timestamps are almost exclusively read (I don't know of any GitHub API off the top of my head that involves providing a timestamp), and `github.Timestamp` includes all of the same methods as `time.Time`, I think this is probably fine.  I haven't reviewed all of the changes in this PR, but the general approach sounds okay.

Patch:
diff --git a/.golangci.yml b/.golangci.yml
index db9a4d71..4d3fc178 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -21,7 +21,9 @@ linters:
     - staticcheck
     - ineffassign
     - unused
-issues: 
+issues:
+  exclude:
+    - composites
   exclude-rules:
   - linters:
     - dogsled
diff --git a/example/commitpr/main.go b/example/commitpr/main.go
index ca6ffc85..5913ec06 100644
--- a/example/commitpr/main.go
+++ b/example/commitpr/main.go
@@ -133,7 +133,7 @@ func pushCommit(ref *github.Reference, tree *github.Tree) (err error) {
 
 	// Create the commit using the tree.
 	date := time.Now()
-	author := &github.CommitAuthor{Date: &date, Name: authorName, Email: authorEmail}
+	author := &github.CommitAuthor{Date: &github.Timestamp{date}, Name: authorName, Email: authorEmail}
 	commit := &github.Commit{Author: author, Message: commitMessage, Tree: tree, Parents: []*github.Commit{parent.Commit}}
 	newCommit, _, err := client.Git.CreateCommit(ctx, *sourceOwner, *sourceRepo, commit)
 	if err != nil {
diff --git a/github/activity_notifications.go b/github/activity_notifications.go
index 38a31845..03476c2e 100644
--- a/github/activity_notifications.go
+++ b/github/activity_notifications.go
@@ -23,8 +23,8 @@ type Notification struct {
 	Reason *string `json:"reason,omitempty"`
 
 	Unread     *bool      `json:"unread,omitempty"`
-	UpdatedAt  *time.Time `json:"updated_at,omitempty"`
-	LastReadAt *time.Time `json:"last_read_at,omitempty"`
+	UpdatedAt  *Timestamp `json:"updated_at,omitempty"`
+	LastReadAt *Timestamp `json:"last_read_at,omitempty"`
 	URL        *string    `json:"url,omitempty"`
 }
 
@@ -97,13 +97,13 @@ func (s *ActivityService) ListRepositoryNotifications(ctx context.Context, owner
 }
 
 type markReadOptions struct {
-	LastReadAt time.Time `json:"last_read_at,omitempty"`
+	LastReadAt Timestamp `json:"last_read_at,omitempty"`
 }
 
 // MarkNotificationsRead marks all notifications up to lastRead as read.
 //
 // GitHub API docs: https://docs.github.com/en/rest/activity#mark-as-read
-func (s *ActivityService) MarkNotificationsRead(ctx context.Context, lastRead time.Time) (*Response, error) {
+func (s *ActivityService) MarkNotificationsRead(ctx context.Context, lastRead Timestamp) (*Response, error) {
 	opts := &markReadOptions{
 		LastReadAt: lastRead,
 	}
@@ -119,7 +119,7 @@ func (s *ActivityService) MarkNotificationsRead(ctx context.Context, lastRead ti
 // the specified repository as read.
 //
 // GitHub API docs: https://docs.github.com/en/rest/activity/notifications#mark-repository-notifications-as-read
-func (s *ActivityService) MarkRepositoryNotificationsRead(ctx context.Context, owner, repo string, lastRead time.Time) (*Response, error) {
+func (s *ActivityService) MarkRepositoryNotificationsRead(ctx context.Context, owner, repo string, lastRead Timestamp) (*Response, error) {
 	opts := &markReadOptions{
 		LastReadAt: lastRead,
 	}
diff --git a/github/apps.go b/github/apps.go
index 98d8a6fd..e1d9aada 100644
--- a/github/apps.go
+++ b/github/apps.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // AppsService provides access to the installation related functions
@@ -36,7 +35,7 @@ type App struct {
 // InstallationToken represents an installation token.
 type InstallationToken struct {
 	Token        *string                  `json:"token,omitempty"`
-	ExpiresAt    *time.Time               `json:"expires_at,omitempty"`
+	ExpiresAt    *Timestamp               `json:"expires_at,omitempty"`
 	Permissions  *InstallationPermissions `json:"permissions,omitempty"`
 	Repositories []*Repository            `json:"repositories,omitempty"`
 }
diff --git a/github/code-scanning.go b/github/code-scanning.go
index 53200fa3..6717348e 100644
--- a/github/code-scanning.go
+++ b/github/code-scanning.go
@@ -173,6 +173,22 @@ type SarifAnalysis struct {
 	ToolName    *string    `json:"tool_name,omitempty"`
 }
 
+// CodeScanningAlertState specifies the state of a code scanning alert.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning
+type CodeScanningAlertState struct {
+	// State sets the state of the code scanning alert and is a required field.
+	// You must also provide DismissedReason when you set the state to "dismissed".
+	// State can be one of: "open", "dismissed".
+	State string `json:"state"`
+	// DismissedReason represents the reason for dismissing or closing the alert.
+	// It is required when the state is "dismissed".
+	// It can be one of: "false positive", "won't fix", "used in tests".
+	DismissedReason *string `json:"dismissed_reason,omitempty"`
+	// DismissedComment is associated with the dismissal of the alert.
+	DismissedComment *string `json:"dismissed_comment,omitempty"`
+}
+
 // SarifID identifies a sarif analysis upload.
 //
 // GitHub API docs: https://docs.github.com/en/rest/code-scanning
@@ -261,6 +277,31 @@ func (s *CodeScanningService) GetAlert(ctx context.Context, owner, repo string,
 	return a, resp, nil
 }
 
+// UpdateAlert updates the state of a single code scanning alert for a repository.
+//
+// You must use an access token with the security_events scope to use this endpoint.
+// GitHub Apps must have the security_events read permission to use this endpoint.
+//
+// The security alert_id is the number at the end of the security alert's URL.
+//
+// GitHub API docs: https://docs.github.com/en/rest/code-scanning?apiVersion=2022-11-28#update-a-code-scanning-alert
+func (s *CodeScanningService) UpdateAlert(ctx context.Context, owner, repo string, id int64, stateInfo *CodeScanningAlertState) (*Alert, *Response, error) {
+	u := fmt.Sprintf("repos/%v/%v/code-scanning/alerts/%v", owner, repo, id)
+
+	req, err := s.client.NewRequest("PATCH", u, stateInfo)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	a := new(Alert)
+	resp, err := s.client.Do(ctx, req, a)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return a, resp, nil
+}
+
 // UploadSarif uploads the result of code scanning job to GitHub.
 //
 // For the parameter sarif, you must first compress your SARIF file using gzip and then translate the contents of the file into a Base64 encoding string.
diff --git a/github/event.go b/github/event.go
index 5b2312fb..44c5f46f 100644
--- a/github/event.go
+++ b/github/event.go
@@ -7,7 +7,6 @@ package github
 
 import (
 	"encoding/json"
-	"time"
 )
 
 // Event represents a GitHub event.
@@ -18,7 +17,7 @@ type Event struct {
 	Repo       *Repository      `json:"repo,omitempty"`
 	Actor      *User            `json:"actor,omitempty"`
 	Org        *Organization    `json:"org,omitempty"`
-	CreatedAt  *time.Time       `json:"created_at,omitempty"`
+	CreatedAt  *Timestamp       `json:"created_at,omitempty"`
 	ID         *string          `json:"id,omitempty"`
 }
 
diff --git a/github/gists.go b/github/gists.go
index ecdc6f27..80961fcb 100644
--- a/github/gists.go
+++ b/github/gists.go
@@ -28,8 +28,8 @@ type Gist struct {
 	HTMLURL     *string                   `json:"html_url,omitempty"`
 	GitPullURL  *string                   `json:"git_pull_url,omitempty"`
 	GitPushURL  *string                   `json:"git_push_url,omitempty"`
-	CreatedAt   *time.Time                `json:"created_at,omitempty"`
-	UpdatedAt   *time.Time                `json:"updated_at,omitempty"`
+	CreatedAt   *Timestamp                `json:"created_at,omitempty"`
+	UpdatedAt   *Timestamp                `json:"updated_at,omitempty"`
 	NodeID      *string                   `json:"node_id,omitempty"`
 }
 
diff --git a/github/gists_comments.go b/github/gists_comments.go
index d551e9a1..ee0fbfa4 100644
--- a/github/gists_comments.go
+++ b/github/gists_comments.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // GistComment represents a Gist comment.
@@ -17,7 +16,7 @@ type GistComment struct {
 	URL       *string    `json:"url,omitempty"`
 	Body      *string    `json:"body,omitempty"`
 	User      *User      `json:"user,omitempty"`
-	CreatedAt *time.Time `json:"created_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
 }
 
 func (g GistComment) String() string {
diff --git a/github/git_commits.go b/github/git_commits.go
index baedb3d6..81994c6e 100644
--- a/github/git_commits.go
+++ b/github/git_commits.go
@@ -11,7 +11,6 @@ import (
 	"errors"
 	"fmt"
 	"strings"
-	"time"
 
 	"golang.org/x/crypto/openpgp"
 )
@@ -56,7 +55,7 @@ func (c Commit) String() string {
 // CommitAuthor represents the author or committer of a commit. The commit
 // author may not correspond to a GitHub User.
 type CommitAuthor struct {
-	Date  *time.Time `json:"date,omitempty"`
+	Date  *Timestamp `json:"date,omitempty"`
 	Name  *string    `json:"name,omitempty"`
 	Email *string    `json:"email,omitempty"`
 
diff --git a/github/github-accessors.go b/github/github-accessors.go
index 400bde8c..e2d0d7f8 100644
--- a/github/github-accessors.go
+++ b/github/github-accessors.go
@@ -2582,6 +2582,22 @@ func (c *CodeScanningAlertEvent) GetSender() *User {
 	return c.Sender
 }
 
+// GetDismissedComment returns the DismissedComment field if it's non-nil, zero value otherwise.
+func (c *CodeScanningAlertState) GetDismissedComment() string {
+	if c == nil || c.DismissedComment == nil {
+		return ""
+	}
+	return *c.DismissedComment
+}
+
+// GetDismissedReason returns the DismissedReason field if it's non-nil, zero value otherwise.
+func (c *CodeScanningAlertState) GetDismissedReason() string {
+	if c == nil || c.DismissedReason == nil {
+		return ""
+	}
+	return *c.DismissedReason
+}
+
 // GetIncompleteResults returns the IncompleteResults field if it's non-nil, zero value otherwise.
 func (c *CodeSearchResult) GetIncompleteResults() bool {
 	if c == nil || c.IncompleteResults == nil {
@@ -2711,9 +2727,9 @@ func (c *CombinedStatus) GetTotalCount() int {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (c *Comment) GetCreatedAt() time.Time {
+func (c *Comment) GetCreatedAt() Timestamp {
 	if c == nil || c.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *c.CreatedAt
 }
@@ -2839,9 +2855,9 @@ func (c *Commit) GetVerification() *SignatureVerification {
 }
 
 // GetDate returns the Date field if it's non-nil, zero value otherwise.
-func (c *CommitAuthor) GetDate() time.Time {
+func (c *CommitAuthor) GetDate() Timestamp {
 	if c == nil || c.Date == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *c.Date
 }
@@ -3295,9 +3311,9 @@ func (c *CommunityHealthMetrics) GetHealthPercentage() int {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (c *CommunityHealthMetrics) GetUpdatedAt() time.Time {
+func (c *CommunityHealthMetrics) GetUpdatedAt() Timestamp {
 	if c == nil || c.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *c.UpdatedAt
 }
@@ -5431,9 +5447,9 @@ func (e *Event) GetActor() *User {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (e *Event) GetCreatedAt() time.Time {
+func (e *Event) GetCreatedAt() Timestamp {
 	if e == nil || e.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *e.CreatedAt
 }
@@ -5767,9 +5783,9 @@ func (g *Gist) GetComments() int {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (g *Gist) GetCreatedAt() time.Time {
+func (g *Gist) GetCreatedAt() Timestamp {
 	if g == nil || g.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *g.CreatedAt
 }
@@ -5847,9 +5863,9 @@ func (g *Gist) GetPublic() bool {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (g *Gist) GetUpdatedAt() time.Time {
+func (g *Gist) GetUpdatedAt() Timestamp {
 	if g == nil || g.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *g.UpdatedAt
 }
@@ -5863,9 +5879,9 @@ func (g *GistComment) GetBody() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (g *GistComment) GetCreatedAt() time.Time {
+func (g *GistComment) GetCreatedAt() Timestamp {
 	if g == nil || g.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *g.CreatedAt
 }
@@ -6199,17 +6215,17 @@ func (g *GPGKey) GetCanSign() bool {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (g *GPGKey) GetCreatedAt() time.Time {
+func (g *GPGKey) GetCreatedAt() Timestamp {
 	if g == nil || g.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *g.CreatedAt
 }
 
 // GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise.
-func (g *GPGKey) GetExpiresAt() time.Time {
+func (g *GPGKey) GetExpiresAt() Timestamp {
 	if g == nil || g.ExpiresAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *g.ExpiresAt
 }
@@ -6375,9 +6391,9 @@ func (h *Hook) GetActive() bool {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (h *Hook) GetCreatedAt() time.Time {
+func (h *Hook) GetCreatedAt() Timestamp {
 	if h == nil || h.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *h.CreatedAt
 }
@@ -6423,9 +6439,9 @@ func (h *Hook) GetType() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (h *Hook) GetUpdatedAt() time.Time {
+func (h *Hook) GetUpdatedAt() Timestamp {
 	if h == nil || h.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *h.UpdatedAt
 }
@@ -7327,9 +7343,9 @@ func (i *InstallationRepositoriesEvent) GetSender() *User {
 }
 
 // GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise.
-func (i *InstallationToken) GetExpiresAt() time.Time {
+func (i *InstallationToken) GetExpiresAt() Timestamp {
 	if i == nil || i.ExpiresAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.ExpiresAt
 }
@@ -7383,9 +7399,9 @@ func (i *InteractionRestriction) GetOrigin() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (i *Invitation) GetCreatedAt() time.Time {
+func (i *Invitation) GetCreatedAt() Timestamp {
 	if i == nil || i.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.CreatedAt
 }
@@ -7503,9 +7519,9 @@ func (i *Issue) GetBody() string {
 }
 
 // GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.
-func (i *Issue) GetClosedAt() time.Time {
+func (i *Issue) GetClosedAt() Timestamp {
 	if i == nil || i.ClosedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.ClosedAt
 }
@@ -7535,9 +7551,9 @@ func (i *Issue) GetCommentsURL() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (i *Issue) GetCreatedAt() time.Time {
+func (i *Issue) GetCreatedAt() Timestamp {
 	if i == nil || i.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.CreatedAt
 }
@@ -7663,9 +7679,9 @@ func (i *Issue) GetTitle() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (i *Issue) GetUpdatedAt() time.Time {
+func (i *Issue) GetUpdatedAt() Timestamp {
 	if i == nil || i.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.UpdatedAt
 }
@@ -7703,9 +7719,9 @@ func (i *IssueComment) GetBody() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueComment) GetCreatedAt() time.Time {
+func (i *IssueComment) GetCreatedAt() Timestamp {
 	if i == nil || i.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.CreatedAt
 }
@@ -7751,9 +7767,9 @@ func (i *IssueComment) GetReactions() *Reactions {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueComment) GetUpdatedAt() time.Time {
+func (i *IssueComment) GetUpdatedAt() Timestamp {
 	if i == nil || i.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.UpdatedAt
 }
@@ -7871,9 +7887,9 @@ func (i *IssueEvent) GetCommitID() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueEvent) GetCreatedAt() time.Time {
+func (i *IssueEvent) GetCreatedAt() Timestamp {
 	if i == nil || i.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.CreatedAt
 }
@@ -7991,17 +8007,17 @@ func (i *IssueImport) GetClosed() bool {
 }
 
 // GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.
-func (i *IssueImport) GetClosedAt() time.Time {
+func (i *IssueImport) GetClosedAt() Timestamp {
 	if i == nil || i.ClosedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.ClosedAt
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueImport) GetCreatedAt() time.Time {
+func (i *IssueImport) GetCreatedAt() Timestamp {
 	if i == nil || i.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.CreatedAt
 }
@@ -8015,9 +8031,9 @@ func (i *IssueImport) GetMilestone() int {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueImport) GetUpdatedAt() time.Time {
+func (i *IssueImport) GetUpdatedAt() Timestamp {
 	if i == nil || i.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.UpdatedAt
 }
@@ -8063,9 +8079,9 @@ func (i *IssueImportError) GetValue() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueImportResponse) GetCreatedAt() time.Time {
+func (i *IssueImportResponse) GetCreatedAt() Timestamp {
 	if i == nil || i.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.CreatedAt
 }
@@ -8119,9 +8135,9 @@ func (i *IssueImportResponse) GetStatus() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (i *IssueImportResponse) GetUpdatedAt() time.Time {
+func (i *IssueImportResponse) GetUpdatedAt() Timestamp {
 	if i == nil || i.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *i.UpdatedAt
 }
@@ -9639,9 +9655,9 @@ func (m *Migration) GetURL() string {
 }
 
 // GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.
-func (m *Milestone) GetClosedAt() time.Time {
+func (m *Milestone) GetClosedAt() Timestamp {
 	if m == nil || m.ClosedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *m.ClosedAt
 }
@@ -9655,9 +9671,9 @@ func (m *Milestone) GetClosedIssues() int {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (m *Milestone) GetCreatedAt() time.Time {
+func (m *Milestone) GetCreatedAt() Timestamp {
 	if m == nil || m.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *m.CreatedAt
 }
@@ -9679,9 +9695,9 @@ func (m *Milestone) GetDescription() string {
 }
 
 // GetDueOn returns the DueOn field if it's non-nil, zero value otherwise.
-func (m *Milestone) GetDueOn() time.Time {
+func (m *Milestone) GetDueOn() Timestamp {
 	if m == nil || m.DueOn == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *m.DueOn
 }
@@ -9751,9 +9767,9 @@ func (m *Milestone) GetTitle() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (m *Milestone) GetUpdatedAt() time.Time {
+func (m *Milestone) GetUpdatedAt() Timestamp {
 	if m == nil || m.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *m.UpdatedAt
 }
@@ -10007,9 +10023,9 @@ func (n *Notification) GetID() string {
 }
 
 // GetLastReadAt returns the LastReadAt field if it's non-nil, zero value otherwise.
-func (n *Notification) GetLastReadAt() time.Time {
+func (n *Notification) GetLastReadAt() Timestamp {
 	if n == nil || n.LastReadAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *n.LastReadAt
 }
@@ -10047,9 +10063,9 @@ func (n *Notification) GetUnread() bool {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (n *Notification) GetUpdatedAt() time.Time {
+func (n *Notification) GetUpdatedAt() Timestamp {
 	if n == nil || n.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *n.UpdatedAt
 }
@@ -10175,9 +10191,9 @@ func (o *Organization) GetCompany() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (o *Organization) GetCreatedAt() time.Time {
+func (o *Organization) GetCreatedAt() Timestamp {
 	if o == nil || o.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *o.CreatedAt
 }
@@ -10543,9 +10559,9 @@ func (o *Organization) GetType() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (o *Organization) GetUpdatedAt() time.Time {
+func (o *Organization) GetUpdatedAt() Timestamp {
 	if o == nil || o.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *o.UpdatedAt
 }
@@ -12831,9 +12847,9 @@ func (p *PullRequest) GetChangedFiles() int {
 }
 
 // GetClosedAt returns the ClosedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequest) GetClosedAt() time.Time {
+func (p *PullRequest) GetClosedAt() Timestamp {
 	if p == nil || p.ClosedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.ClosedAt
 }
@@ -12871,9 +12887,9 @@ func (p *PullRequest) GetCommitsURL() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequest) GetCreatedAt() time.Time {
+func (p *PullRequest) GetCreatedAt() Timestamp {
 	if p == nil || p.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.CreatedAt
 }
@@ -12991,9 +13007,9 @@ func (p *PullRequest) GetMerged() bool {
 }
 
 // GetMergedAt returns the MergedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequest) GetMergedAt() time.Time {
+func (p *PullRequest) GetMergedAt() Timestamp {
 	if p == nil || p.MergedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.MergedAt
 }
@@ -13095,9 +13111,9 @@ func (p *PullRequest) GetTitle() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequest) GetUpdatedAt() time.Time {
+func (p *PullRequest) GetUpdatedAt() Timestamp {
 	if p == nil || p.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.UpdatedAt
 }
@@ -13239,9 +13255,9 @@ func (p *PullRequestComment) GetCommitID() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequestComment) GetCreatedAt() time.Time {
+func (p *PullRequestComment) GetCreatedAt() Timestamp {
 	if p == nil || p.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.CreatedAt
 }
@@ -13391,9 +13407,9 @@ func (p *PullRequestComment) GetStartSide() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequestComment) GetUpdatedAt() time.Time {
+func (p *PullRequestComment) GetUpdatedAt() Timestamp {
 	if p == nil || p.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.UpdatedAt
 }
@@ -13647,9 +13663,9 @@ func (p *PullRequestReview) GetState() string {
 }
 
 // GetSubmittedAt returns the SubmittedAt field if it's non-nil, zero value otherwise.
-func (p *PullRequestReview) GetSubmittedAt() time.Time {
+func (p *PullRequestReview) GetSubmittedAt() Timestamp {
 	if p == nil || p.SubmittedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *p.SubmittedAt
 }
@@ -15919,9 +15935,9 @@ func (r *RepositoryComment) GetCommitID() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (r *RepositoryComment) GetCreatedAt() time.Time {
+func (r *RepositoryComment) GetCreatedAt() Timestamp {
 	if r == nil || r.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *r.CreatedAt
 }
@@ -15975,9 +15991,9 @@ func (r *RepositoryComment) GetReactions() *Reactions {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (r *RepositoryComment) GetUpdatedAt() time.Time {
+func (r *RepositoryComment) GetUpdatedAt() Timestamp {
 	if r == nil || r.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *r.UpdatedAt
 }
@@ -16927,9 +16943,9 @@ func (r *RepoStatus) GetContext() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (r *RepoStatus) GetCreatedAt() time.Time {
+func (r *RepoStatus) GetCreatedAt() Timestamp {
 	if r == nil || r.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *r.CreatedAt
 }
@@ -16983,9 +16999,9 @@ func (r *RepoStatus) GetTargetURL() string {
 }
 
 // GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise.
-func (r *RepoStatus) GetUpdatedAt() time.Time {
+func (r *RepoStatus) GetUpdatedAt() Timestamp {
 	if r == nil || r.UpdatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *r.UpdatedAt
 }
@@ -19247,9 +19263,9 @@ func (t *Timeline) GetCommitURL() string {
 }
 
 // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise.
-func (t *Timeline) GetCreatedAt() time.Time {
+func (t *Timeline) GetCreatedAt() Timestamp {
 	if t == nil || t.CreatedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *t.CreatedAt
 }
@@ -19351,9 +19367,9 @@ func (t *Timeline) GetState() string {
 }
 
 // GetSubmittedAt returns the SubmittedAt field if it's non-nil, zero value otherwise.
-func (t *Timeline) GetSubmittedAt() time.Time {
+func (t *Timeline) GetSubmittedAt() Timestamp {
 	if t == nil || t.SubmittedAt == nil {
-		return time.Time{}
+		return Timestamp{}
 	}
 	return *t.SubmittedAt
 }
diff --git a/github/github.go b/github/github.go
index 7d915dfa..aebfaf7b 100644
--- a/github/github.go
+++ b/github/github.go
@@ -847,7 +847,7 @@ An ErrorResponse reports one or more errors caused by an API request.
 GitHub API docs: https://docs.github.com/en/rest/#client-errors
 */
 type ErrorResponse struct {
-	Response *http.Response // HTTP response that caused this error
+	Response *http.Response `json:"-"`       // HTTP response that caused this error
 	Message  string         `json:"message"` // error message
 	Errors   []Error        `json:"errors"`  // more detail on individual errors
 	// Block is only populated on certain types of errors such as code 451.
diff --git a/github/issue_import.go b/github/issue_import.go
index a9810407..4bc8d5f1 100644
--- a/github/issue_import.go
+++ b/github/issue_import.go
@@ -10,7 +10,6 @@ import (
 	"context"
 	"encoding/json"
 	"fmt"
-	"time"
 )
 
 // IssueImportService handles communication with the issue import related
@@ -29,9 +28,9 @@ type IssueImportRequest struct {
 type IssueImport struct {
 	Title     string     `json:"title"`
 	Body      string     `json:"body"`
-	CreatedAt *time.Time `json:"created_at,omitempty"`
-	ClosedAt  *time.Time `json:"closed_at,omitempty"`
-	UpdatedAt *time.Time `json:"updated_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
+	ClosedAt  *Timestamp `json:"closed_at,omitempty"`
+	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
 	Assignee  *string    `json:"assignee,omitempty"`
 	Milestone *int       `json:"milestone,omitempty"`
 	Closed    *bool      `json:"closed,omitempty"`
@@ -40,7 +39,7 @@ type IssueImport struct {
 
 // Comment represents comments of issue to import.
 type Comment struct {
-	CreatedAt *time.Time `json:"created_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
 	Body      string     `json:"body"`
 }
 
@@ -53,8 +52,8 @@ type IssueImportResponse struct {
 	URL              *string             `json:"url,omitempty"`
 	ImportIssuesURL  *string             `json:"import_issues_url,omitempty"`
 	RepositoryURL    *string             `json:"repository_url,omitempty"`
-	CreatedAt        *time.Time          `json:"created_at,omitempty"`
-	UpdatedAt        *time.Time          `json:"updated_at,omitempty"`
+	CreatedAt        *Timestamp          `json:"created_at,omitempty"`
+	UpdatedAt        *Timestamp          `json:"updated_at,omitempty"`
 	Message          *string             `json:"message,omitempty"`
 	DocumentationURL *string             `json:"documentation_url,omitempty"`
 	Errors           []*IssueImportError `json:"errors,omitempty"`
@@ -126,7 +125,7 @@ func (s *IssueImportService) CheckStatus(ctx context.Context, owner, repo string
 // CheckStatusSince checks the status of multiple imported issues since a given date.
 //
 // https://gist.github.com/jonmagic/5282384165e0f86ef105#check-status-of-multiple-issues
-func (s *IssueImportService) CheckStatusSince(ctx context.Context, owner, repo string, since time.Time) ([]*IssueImportResponse, *Response, error) {
+func (s *IssueImportService) CheckStatusSince(ctx context.Context, owner, repo string, since Timestamp) ([]*IssueImportResponse, *Response, error) {
 	u := fmt.Sprintf("repos/%v/%v/import/issues?since=%v", owner, repo, since.Format("2006-01-02"))
 	req, err := s.client.NewRequest("GET", u, nil)
 	if err != nil {
diff --git a/github/issues.go b/github/issues.go
index 571a7211..42e58a17 100644
--- a/github/issues.go
+++ b/github/issues.go
@@ -38,9 +38,9 @@ type Issue struct {
 	Labels            []*Label          `json:"labels,omitempty"`
 	Assignee          *User             `json:"assignee,omitempty"`
 	Comments          *int              `json:"comments,omitempty"`
-	ClosedAt          *time.Time        `json:"closed_at,omitempty"`
-	CreatedAt         *time.Time        `json:"created_at,omitempty"`
-	UpdatedAt         *time.Time        `json:"updated_at,omitempty"`
+	ClosedAt          *Timestamp        `json:"closed_at,omitempty"`
+	CreatedAt         *Timestamp        `json:"created_at,omitempty"`
+	UpdatedAt         *Timestamp        `json:"updated_at,omitempty"`
 	ClosedBy          *User             `json:"closed_by,omitempty"`
 	URL               *string           `json:"url,omitempty"`
 	HTMLURL           *string           `json:"html_url,omitempty"`
diff --git a/github/issues_comments.go b/github/issues_comments.go
index 361ee49a..17881c09 100644
--- a/github/issues_comments.go
+++ b/github/issues_comments.go
@@ -18,8 +18,8 @@ type IssueComment struct {
 	Body      *string    `json:"body,omitempty"`
 	User      *User      `json:"user,omitempty"`
 	Reactions *Reactions `json:"reactions,omitempty"`
-	CreatedAt *time.Time `json:"created_at,omitempty"`
-	UpdatedAt *time.Time `json:"updated_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
 	// AuthorAssociation is the comment author's relationship to the issue's repository.
 	// Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE".
 	AuthorAssociation *string `json:"author_association,omitempty"`
diff --git a/github/issues_events.go b/github/issues_events.go
index d8ffc0b5..ed076591 100644
--- a/github/issues_events.go
+++ b/github/issues_events.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // IssueEvent represents an event that occurred around an Issue or Pull Request.
@@ -71,7 +70,7 @@ type IssueEvent struct {
 	//
 	Event *string `json:"event,omitempty"`
 
-	CreatedAt *time.Time `json:"created_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
 	Issue     *Issue     `json:"issue,omitempty"`
 
 	// Only present on certain events; see above.
diff --git a/github/issues_milestones.go b/github/issues_milestones.go
index 3c9be240..897c7c0b 100644
--- a/github/issues_milestones.go
+++ b/github/issues_milestones.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // Milestone represents a GitHub repository milestone.
@@ -24,10 +23,10 @@ type Milestone struct {
 	Creator      *User      `json:"creator,omitempty"`
 	OpenIssues   *int       `json:"open_issues,omitempty"`
 	ClosedIssues *int       `json:"closed_issues,omitempty"`
-	CreatedAt    *time.Time `json:"created_at,omitempty"`
-	UpdatedAt    *time.Time `json:"updated_at,omitempty"`
-	ClosedAt     *time.Time `json:"closed_at,omitempty"`
-	DueOn        *time.Time `json:"due_on,omitempty"`
+	CreatedAt    *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt    *Timestamp `json:"updated_at,omitempty"`
+	ClosedAt     *Timestamp `json:"closed_at,omitempty"`
+	DueOn        *Timestamp `json:"due_on,omitempty"`
 	NodeID       *string    `json:"node_id,omitempty"`
 }
 
diff --git a/github/issues_timeline.go b/github/issues_timeline.go
index 7b9068ac..2f049aff 100644
--- a/github/issues_timeline.go
+++ b/github/issues_timeline.go
@@ -9,7 +9,6 @@ import (
 	"context"
 	"fmt"
 	"strings"
-	"time"
 )
 
 // Timeline represents an event that occurred around an Issue or Pull Request.
@@ -118,7 +117,7 @@ type Timeline struct {
 	// The string SHA of a commit that referenced this Issue or Pull Request.
 	CommitID *string `json:"commit_id,omitempty"`
 	// The timestamp indicating when the event occurred.
-	CreatedAt *time.Time `json:"created_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
 	// The Label object including `name` and `color` attributes. Only provided for
 	// 'labeled' and 'unlabeled' events.
 	Label *Label `json:"label,omitempty"`
@@ -149,7 +148,7 @@ type Timeline struct {
 
 	// The review summary text.
 	Body        *string    `json:"body,omitempty"`
-	SubmittedAt *time.Time `json:"submitted_at,omitempty"`
+	SubmittedAt *Timestamp `json:"submitted_at,omitempty"`
 }
 
 // Source represents a reference's source.
diff --git a/github/orgs.go b/github/orgs.go
index 8105afad..48740577 100644
--- a/github/orgs.go
+++ b/github/orgs.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // OrganizationsService provides access to the organization related functions
@@ -35,8 +34,8 @@ type Organization struct {
 	PublicGists                 *int       `json:"public_gists,omitempty"`
 	Followers                   *int       `json:"followers,omitempty"`
 	Following                   *int       `json:"following,omitempty"`
-	CreatedAt                   *time.Time `json:"created_at,omitempty"`
-	UpdatedAt                   *time.Time `json:"updated_at,omitempty"`
+	CreatedAt                   *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt                   *Timestamp `json:"updated_at,omitempty"`
 	TotalPrivateRepos           *int       `json:"total_private_repos,omitempty"`
 	OwnedPrivateRepos           *int       `json:"owned_private_repos,omitempty"`
 	PrivateGists                *int       `json:"private_gists,omitempty"`
diff --git a/github/pulls.go b/github/pulls.go
index 120a1d6f..6e49eba2 100644
--- a/github/pulls.go
+++ b/github/pulls.go
@@ -9,7 +9,6 @@ import (
 	"bytes"
 	"context"
 	"fmt"
-	"time"
 )
 
 // PullRequestsService handles communication with the pull request related
@@ -34,10 +33,10 @@ type PullRequest struct {
 	Locked              *bool                 `json:"locked,omitempty"`
 	Title               *string               `json:"title,omitempty"`
 	Body                *string               `json:"body,omitempty"`
-	CreatedAt           *time.Time            `json:"created_at,omitempty"`
-	UpdatedAt           *time.Time            `json:"updated_at,omitempty"`
-	ClosedAt            *time.Time            `json:"closed_at,omitempty"`
-	MergedAt            *time.Time            `json:"merged_at,omitempty"`
+	CreatedAt           *Timestamp            `json:"created_at,omitempty"`
+	UpdatedAt           *Timestamp            `json:"updated_at,omitempty"`
+	ClosedAt            *Timestamp            `json:"closed_at,omitempty"`
+	MergedAt            *Timestamp            `json:"merged_at,omitempty"`
 	Labels              []*Label              `json:"labels,omitempty"`
 	User                *User                 `json:"user,omitempty"`
 	Draft               *bool                 `json:"draft,omitempty"`
diff --git a/github/pulls_comments.go b/github/pulls_comments.go
index 83e7881e..1f6b726d 100644
--- a/github/pulls_comments.go
+++ b/github/pulls_comments.go
@@ -33,8 +33,8 @@ type PullRequestComment struct {
 	OriginalCommitID    *string    `json:"original_commit_id,omitempty"`
 	User                *User      `json:"user,omitempty"`
 	Reactions           *Reactions `json:"reactions,omitempty"`
-	CreatedAt           *time.Time `json:"created_at,omitempty"`
-	UpdatedAt           *time.Time `json:"updated_at,omitempty"`
+	CreatedAt           *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt           *Timestamp `json:"updated_at,omitempty"`
 	// AuthorAssociation is the comment author's relationship to the pull request's repository.
 	// Possible values are "COLLABORATOR", "CONTRIBUTOR", "FIRST_TIMER", "FIRST_TIME_CONTRIBUTOR", "MEMBER", "OWNER", or "NONE".
 	AuthorAssociation *string `json:"author_association,omitempty"`
diff --git a/github/pulls_reviews.go b/github/pulls_reviews.go
index 77bf60ce..addcce46 100644
--- a/github/pulls_reviews.go
+++ b/github/pulls_reviews.go
@@ -9,7 +9,6 @@ import (
 	"context"
 	"errors"
 	"fmt"
-	"time"
 )
 
 var ErrMixedCommentStyles = errors.New("cannot use both position and side/line form comments")
@@ -20,7 +19,7 @@ type PullRequestReview struct {
 	NodeID         *string    `json:"node_id,omitempty"`
 	User           *User      `json:"user,omitempty"`
 	Body           *string    `json:"body,omitempty"`
-	SubmittedAt    *time.Time `json:"submitted_at,omitempty"`
+	SubmittedAt    *Timestamp `json:"submitted_at,omitempty"`
 	CommitID       *string    `json:"commit_id,omitempty"`
 	HTMLURL        *string    `json:"html_url,omitempty"`
 	PullRequestURL *string    `json:"pull_request_url,omitempty"`
diff --git a/github/repos_comments.go b/github/repos_comments.go
index 55a88d1f..e282374e 100644
--- a/github/repos_comments.go
+++ b/github/repos_comments.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // RepositoryComment represents a comment for a commit, file, or line in a repository.
@@ -20,8 +19,8 @@ type RepositoryComment struct {
 	CommitID  *string    `json:"commit_id,omitempty"`
 	User      *User      `json:"user,omitempty"`
 	Reactions *Reactions `json:"reactions,omitempty"`
-	CreatedAt *time.Time `json:"created_at,omitempty"`
-	UpdatedAt *time.Time `json:"updated_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
 
 	// User-mutable fields
 	Body *string `json:"body"`
diff --git a/github/repos_community_health.go b/github/repos_community_health.go
index 9de438b6..750ee158 100644
--- a/github/repos_community_health.go
+++ b/github/repos_community_health.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // Metric represents the different fields for one file in community health files.
@@ -38,7 +37,7 @@ type CommunityHealthMetrics struct {
 	Description           *string               `json:"description"`
 	Documentation         *string               `json:"documentation"`
 	Files                 *CommunityHealthFiles `json:"files"`
-	UpdatedAt             *time.Time            `json:"updated_at"`
+	UpdatedAt             *Timestamp            `json:"updated_at"`
 	ContentReportsEnabled *bool                 `json:"content_reports_enabled"`
 }
 
diff --git a/github/repos_hooks.go b/github/repos_hooks.go
index 44eac8a4..ba229e7b 100644
--- a/github/repos_hooks.go
+++ b/github/repos_hooks.go
@@ -11,7 +11,6 @@ import (
 	"net/http"
 	"net/url"
 	"strings"
-	"time"
 )
 
 // WebHookPayload represents the data that is received from GitHub when a push
@@ -40,8 +39,8 @@ type WebHookAuthor = CommitAuthor
 
 // Hook represents a GitHub (web and service) hook for a repository.
 type Hook struct {
-	CreatedAt    *time.Time             `json:"created_at,omitempty"`
-	UpdatedAt    *time.Time             `json:"updated_at,omitempty"`
+	CreatedAt    *Timestamp             `json:"created_at,omitempty"`
+	UpdatedAt    *Timestamp             `json:"updated_at,omitempty"`
 	URL          *string                `json:"url,omitempty"`
 	ID           *int64                 `json:"id,omitempty"`
 	Type         *string                `json:"type,omitempty"`
diff --git a/github/repos_statuses.go b/github/repos_statuses.go
index 42238f3c..ea3d166c 100644
--- a/github/repos_statuses.go
+++ b/github/repos_statuses.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // RepoStatus represents the status of a repository at a particular reference.
@@ -35,8 +34,8 @@ type RepoStatus struct {
 	AvatarURL *string `json:"avatar_url,omitempty"`
 
 	Creator   *User      `json:"creator,omitempty"`
-	CreatedAt *time.Time `json:"created_at,omitempty"`
-	UpdatedAt *time.Time `json:"updated_at,omitempty"`
+	CreatedAt *Timestamp `json:"created_at,omitempty"`
+	UpdatedAt *Timestamp `json:"updated_at,omitempty"`
 }
 
 func (r RepoStatus) String() string {
diff --git a/github/teams.go b/github/teams.go
index 38845e09..963a69b3 100644
--- a/github/teams.go
+++ b/github/teams.go
@@ -10,7 +10,6 @@ import (
 	"fmt"
 	"net/http"
 	"strings"
-	"time"
 )
 
 // TeamsService provides access to the team-related functions
@@ -68,7 +67,7 @@ type Invitation struct {
 	Email  *string `json:"email,omitempty"`
 	// Role can be one of the values - 'direct_member', 'admin', 'billing_manager', 'hiring_manager', or 'reinstate'.
 	Role              *string    `json:"role,omitempty"`
-	CreatedAt         *time.Time `json:"created_at,omitempty"`
+	CreatedAt         *Timestamp `json:"created_at,omitempty"`
 	Inviter           *User      `json:"inviter,omitempty"`
 	TeamCount         *int       `json:"team_count,omitempty"`
 	InvitationTeamURL *string    `json:"invitation_team_url,omitempty"`
diff --git a/github/users_gpg_keys.go b/github/users_gpg_keys.go
index e9ce6222..54189b83 100644
--- a/github/users_gpg_keys.go
+++ b/github/users_gpg_keys.go
@@ -8,7 +8,6 @@ package github
 import (
 	"context"
 	"fmt"
-	"time"
 )
 
 // GPGKey represents a GitHub user's public GPG key used to verify GPG signed commits and tags.
@@ -26,8 +25,8 @@ type GPGKey struct {
 	CanEncryptComms   *bool       `json:"can_encrypt_comms,omitempty"`
 	CanEncryptStorage *bool       `json:"can_encrypt_storage,omitempty"`
 	CanCertify        *bool       `json:"can_certify,omitempty"`
-	CreatedAt         *time.Time  `json:"created_at,omitempty"`
-	ExpiresAt         *time.Time  `json:"expires_at,omitempty"`
+	CreatedAt         *Timestamp  `json:"created_at,omitempty"`
+	ExpiresAt         *Timestamp  `json:"expires_at,omitempty"`
 }
 
 // String stringifies a GPGKey.


Test patch:
diff --git a/github/activity_notifications_test.go b/github/activity_notifications_test.go
index fcd1cc3a..830c8b10 100644
--- a/github/activity_notifications_test.go
+++ b/github/activity_notifications_test.go
@@ -107,14 +107,14 @@ func TestActivityService_MarkNotificationsRead(t *testing.T) {
 	})
 
 	ctx := context.Background()
-	_, err := client.Activity.MarkNotificationsRead(ctx, time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
+	_, err := client.Activity.MarkNotificationsRead(ctx, Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)})
 	if err != nil {
 		t.Errorf("Activity.MarkNotificationsRead returned error: %v", err)
 	}
 
 	const methodName = "MarkNotificationsRead"
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		return client.Activity.MarkNotificationsRead(ctx, time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
+		return client.Activity.MarkNotificationsRead(ctx, Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)})
 	})
 }
 
@@ -131,19 +131,19 @@ func TestActivityService_MarkRepositoryNotificationsRead(t *testing.T) {
 	})
 
 	ctx := context.Background()
-	_, err := client.Activity.MarkRepositoryNotificationsRead(ctx, "o", "r", time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
+	_, err := client.Activity.MarkRepositoryNotificationsRead(ctx, "o", "r", Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)})
 	if err != nil {
 		t.Errorf("Activity.MarkRepositoryNotificationsRead returned error: %v", err)
 	}
 
 	const methodName = "MarkRepositoryNotificationsRead"
 	testBadOptions(t, methodName, func() (err error) {
-		_, err = client.Activity.MarkRepositoryNotificationsRead(ctx, "\n", "\n", time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
+		_, err = client.Activity.MarkRepositoryNotificationsRead(ctx, "\n", "\n", Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)})
 		return err
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		return client.Activity.MarkRepositoryNotificationsRead(ctx, "o", "r", time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC))
+		return client.Activity.MarkRepositoryNotificationsRead(ctx, "o", "r", Timestamp{time.Date(2006, time.January, 02, 15, 04, 05, 0, time.UTC)})
 	})
 }
 
@@ -331,8 +331,8 @@ func TestNotification_Marshal(t *testing.T) {
 		},
 		Reason:     String("r"),
 		Unread:     Bool(true),
-		UpdatedAt:  &referenceTime,
-		LastReadAt: &referenceTime,
+		UpdatedAt:  &Timestamp{referenceTime},
+		LastReadAt: &Timestamp{referenceTime},
 		URL:        String("u"),
 	}
 
@@ -383,7 +383,7 @@ func TestMarkReadOptions_Marshal(t *testing.T) {
 	testJSONMarshal(t, &markReadOptions{}, "{}")
 
 	u := &markReadOptions{
-		LastReadAt: referenceTime,
+		LastReadAt: Timestamp{referenceTime},
 	}
 
 	want := `{
diff --git a/github/apps_test.go b/github/apps_test.go
index 494f1031..d3e7c434 100644
--- a/github/apps_test.go
+++ b/github/apps_test.go
@@ -997,7 +997,7 @@ func TestInstallationToken_Marshal(t *testing.T) {
 
 	u := &InstallationToken{
 		Token:     String("t"),
-		ExpiresAt: &referenceTime,
+		ExpiresAt: &Timestamp{referenceTime},
 		Permissions: &InstallationPermissions{
 			Actions:                       String("a"),
 			Administration:                String("ad"),
diff --git a/github/code-scanning_test.go b/github/code-scanning_test.go
index c8cf35cf..1ae05096 100644
--- a/github/code-scanning_test.go
+++ b/github/code-scanning_test.go
@@ -613,6 +613,123 @@ func TestCodeScanningService_ListAlertsForRepo(t *testing.T) {
 	})
 }
 
+func TestCodeScanningService_UpdateAlert(t *testing.T) {
+	client, mux, _, teardown := setup()
+	defer teardown()
+	mux.HandleFunc("/repos/o/r/code-scanning/alerts/88", func(w http.ResponseWriter, r *http.Request) {
+		testMethod(t, r, "PATCH")
+		fmt.Fprint(w, `{"rule_id":"js/useless-expression",
+				"rule_severity":"warning",
+				"rule_description":"Expression has no effect",
+				"tool": {
+					"name": "CodeQL",
+					"guid": null,
+					"version": "1.4.0"
+				},
+				"rule": {
+					"id": "useless expression",
+					"severity": "warning",
+					"description": "Expression has no effect",
+					"name": "useless expression",
+					"full_description": "Expression has no effect",
+					"help": "Expression has no effect"
+				},
+				"most_recent_instance": {
+					"ref": "refs/heads/main",
+					"state": "dismissed",
+					"commit_sha": "abcdefg12345",
+					"message": {
+						"text": "This path depends on a user-provided value."
+					},
+					"location": {
+						"path": "spec-main/api-session-spec.ts",
+						"start_line": 917,
+						"end_line": 917,
+						"start_column": 7,
+						"end_column": 18
+					},
+					"classifications": [
+						"test"
+					]
+				},
+				"created_at":"2019-01-02T15:04:05Z",
+				"state":"dismissed",
+				"dismissed_reason": "false positive",
+				"dismissed_comment": "This alert is not actually correct as sanitizer is used",
+				"closed_by":null,
+				"closed_at":null,
+				"url":"https://api.github.com/repos/o/r/code-scanning/alerts/88",
+				"html_url":"https://github.com/o/r/security/code-scanning/88"}`)
+	})
+
+	ctx := context.Background()
+	dismissedComment := String("This alert is not actually correct as sanitizer is used")
+	dismissedReason := String("false positive")
+	state := String("dismissed")
+	stateInfo := &CodeScanningAlertState{State: *state, DismissedReason: dismissedReason, DismissedComment: dismissedComment}
+	alert, _, err := client.CodeScanning.UpdateAlert(ctx, "o", "r", 88, stateInfo)
+	if err != nil {
+		t.Errorf("CodeScanning.UpdateAlert returned error: %v", err)
+	}
+
+	date := Timestamp{time.Date(2019, time.January, 02, 15, 04, 05, 0, time.UTC)}
+	want := &Alert{
+		RuleID:          String("js/useless-expression"),
+		RuleSeverity:    String("warning"),
+		RuleDescription: String("Expression has no effect"),
+		Tool:            &Tool{Name: String("CodeQL"), GUID: nil, Version: String("1.4.0")},
+		Rule: &Rule{
+			ID:              String("useless expression"),
+			Severity:        String("warning"),
+			Description:     String("Expression has no effect"),
+			Name:            String("useless expression"),
+			FullDescription: String("Expression has no effect"),
+			Help:            String("Expression has no effect"),
+		},
+		CreatedAt:        &date,
+		State:            state,
+		DismissedReason:  dismissedReason,
+		DismissedComment: dismissedComment,
+		ClosedBy:         nil,
+		ClosedAt:         nil,
+		URL:              String("https://api.github.com/repos/o/r/code-scanning/alerts/88"),
+		HTMLURL:          String("https://github.com/o/r/security/code-scanning/88"),
+		MostRecentInstance: &MostRecentInstance{
+			Ref:       String("refs/heads/main"),
+			State:     String("dismissed"),
+			CommitSHA: String("abcdefg12345"),
+			Message: &Message{
+				Text: String("This path depends on a user-provided value."),
+			},
+			Location: &Location{
+				Path:        String("spec-main/api-session-spec.ts"),
+				StartLine:   Int(917),
+				EndLine:     Int(917),
+				StartColumn: Int(7),
+				EndColumn:   Int(18),
+			},
+			Classifications: []string{"test"},
+		},
+	}
+	if !cmp.Equal(alert, want) {
+		t.Errorf("CodeScanning.UpdateAlert returned %+v, want %+v", alert, want)
+	}
+
+	const methodName = "UpdateAlert"
+	testBadOptions(t, methodName, func() (err error) {
+		_, _, err = client.CodeScanning.UpdateAlert(ctx, "\n", "\n", -88, stateInfo)
+		return err
+	})
+
+	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
+		got, resp, err := client.CodeScanning.UpdateAlert(ctx, "o", "r", 88, stateInfo)
+		if got != nil {
+			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
+		}
+		return resp, err
+	})
+}
+
 func TestCodeScanningService_GetAlert(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
diff --git a/github/event_test.go b/github/event_test.go
index 713f3b1e..6d20582c 100644
--- a/github/event_test.go
+++ b/github/event_test.go
@@ -78,7 +78,7 @@ func TestEvent_Marshal(t *testing.T) {
 			MembersCanCreatePublicPages:          Bool(false),
 			MembersCanCreatePrivatePages:         Bool(true),
 		},
-		CreatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
 		ID:        String("id"),
 	}
 
diff --git a/github/event_types_test.go b/github/event_types_test.go
index 8cd08688..fdc0809e 100644
--- a/github/event_types_test.go
+++ b/github/event_types_test.go
@@ -4855,8 +4855,8 @@ func TestCommitCommentEvent_Marshal(t *testing.T) {
 				Eyes:       Int(1),
 				URL:        String("url"),
 			},
-			CreatedAt: &referenceTime,
-			UpdatedAt: &referenceTime,
+			CreatedAt: &Timestamp{referenceTime},
+			UpdatedAt: &Timestamp{referenceTime},
 			Body:      String("b"),
 			Path:      String("path"),
 			Position:  Int(1),
@@ -6224,8 +6224,8 @@ func TestPingEvent_Marshal(t *testing.T) {
 		Zen:    String("z"),
 		HookID: Int64(1),
 		Hook: &Hook{
-			CreatedAt:    &referenceTime,
-			UpdatedAt:    &referenceTime,
+			CreatedAt:    &Timestamp{referenceTime},
+			UpdatedAt:    &Timestamp{referenceTime},
 			URL:          String("url"),
 			ID:           Int64(1),
 			Type:         String("t"),
@@ -10698,8 +10698,8 @@ func TestMetaEvent_Marshal(t *testing.T) {
 		Action: String("a"),
 		HookID: Int64(1),
 		Hook: &Hook{
-			CreatedAt:    &referenceTime,
-			UpdatedAt:    &referenceTime,
+			CreatedAt:    &Timestamp{referenceTime},
+			UpdatedAt:    &Timestamp{referenceTime},
 			URL:          String("u"),
 			ID:           Int64(1),
 			Type:         String("t"),
@@ -11745,7 +11745,7 @@ func TestHeadCommit_Marshal(t *testing.T) {
 	u := &HeadCommit{
 		Message: String("m"),
 		Author: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("n"),
 			Email: String("e"),
 			Login: String("u"),
@@ -11757,7 +11757,7 @@ func TestHeadCommit_Marshal(t *testing.T) {
 		TreeID:    String("tid"),
 		Timestamp: &Timestamp{referenceTime},
 		Committer: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("n"),
 			Email: String("e"),
 			Login: String("u"),
diff --git a/github/gists_comments_test.go b/github/gists_comments_test.go
index 0b3cb73a..c9c97068 100644
--- a/github/gists_comments_test.go
+++ b/github/gists_comments_test.go
@@ -42,7 +42,7 @@ func TestGistComments_Marshal(t *testing.T) {
 			CreatedAt:   &Timestamp{referenceTime},
 			URL:         String("u"),
 		},
-		CreatedAt: &createdAt,
+		CreatedAt: &Timestamp{createdAt},
 	}
 
 	want := `{
diff --git a/github/gists_test.go b/github/gists_test.go
index 06a1c43f..3066d585 100644
--- a/github/gists_test.go
+++ b/github/gists_test.go
@@ -57,8 +57,8 @@ func TestGist_Marshal(t *testing.T) {
 		HTMLURL:    String("html-url"),
 		GitPullURL: String("gitpull-url"),
 		GitPushURL: String("gitpush-url"),
-		CreatedAt:  &createdAt,
-		UpdatedAt:  &updatedAt,
+		CreatedAt:  &Timestamp{createdAt},
+		UpdatedAt:  &Timestamp{updatedAt},
 		NodeID:     String("node"),
 	}
 
diff --git a/github/git_commits_test.go b/github/git_commits_test.go
index cc9cc3fc..1fbfa0d2 100644
--- a/github/git_commits_test.go
+++ b/github/git_commits_test.go
@@ -24,13 +24,13 @@ func TestCommit_Marshal(t *testing.T) {
 	u := &Commit{
 		SHA: String("s"),
 		Author: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("n"),
 			Email: String("e"),
 			Login: String("u"),
 		},
 		Committer: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("n"),
 			Email: String("e"),
 			Login: String("u"),
@@ -313,7 +313,7 @@ func TestGitService_CreateSignedCommitWithKey(t *testing.T) {
 	author := CommitAuthor{
 		Name:  String("go-github"),
 		Email: String("go-github@github.com"),
-		Date:  &date,
+		Date:  &Timestamp{date},
 	}
 	input := &Commit{
 		Message:    String("Commit Message."),
@@ -417,7 +417,7 @@ func TestGitService_createSignature_invalidKey(t *testing.T) {
 		Author: &CommitAuthor{
 			Name:  String("go-github"),
 			Email: String("go-github@github.com"),
-			Date:  &date,
+			Date:  &Timestamp{date},
 		},
 	})
 
@@ -442,7 +442,7 @@ func TestGitService_createSignatureMessage_nilMessage(t *testing.T) {
 		Author: &CommitAuthor{
 			Name:  String("go-github"),
 			Email: String("go-github@github.com"),
-			Date:  &date,
+			Date:  &Timestamp{date},
 		},
 	})
 	if err == nil {
@@ -459,7 +459,7 @@ func TestGitService_createSignatureMessage_emptyMessage(t *testing.T) {
 		Author: &CommitAuthor{
 			Name:  String("go-github"),
 			Email: String("go-github@github.com"),
-			Date:  &date,
+			Date:  &Timestamp{date},
 		},
 	})
 	if err == nil {
@@ -487,7 +487,7 @@ func TestGitService_createSignatureMessage_withoutTree(t *testing.T) {
 		Author: &CommitAuthor{
 			Name:  String("go-github"),
 			Email: String("go-github@github.com"),
-			Date:  &date,
+			Date:  &Timestamp{date},
 		},
 	})
 	expected := `parent p
@@ -509,12 +509,12 @@ func TestGitService_createSignatureMessage_withoutCommitter(t *testing.T) {
 		Author: &CommitAuthor{
 			Name:  String("go-github"),
 			Email: String("go-github@github.com"),
-			Date:  &date,
+			Date:  &Timestamp{date},
 		},
 		Committer: &CommitAuthor{
 			Name:  String("foo"),
 			Email: String("foo@bar.com"),
-			Date:  &date,
+			Date:  &Timestamp{date},
 		},
 	})
 	expected := `parent p
@@ -619,7 +619,7 @@ func TestCommitAuthor_Marshal(t *testing.T) {
 	testJSONMarshal(t, &CommitAuthor{}, "{}")
 
 	u := &CommitAuthor{
-		Date:  &referenceTime,
+		Date:  &Timestamp{referenceTime},
 		Name:  String("name"),
 		Email: String("email"),
 		Login: String("login"),
@@ -640,13 +640,13 @@ func TestCreateCommit_Marshal(t *testing.T) {
 
 	u := &createCommit{
 		Author: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("name"),
 			Email: String("email"),
 			Login: String("login"),
 		},
 		Committer: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("name"),
 			Email: String("email"),
 			Login: String("login"),
diff --git a/github/git_tags_test.go b/github/git_tags_test.go
index 2d13722a..0d45ee26 100644
--- a/github/git_tags_test.go
+++ b/github/git_tags_test.go
@@ -107,7 +107,7 @@ func TestTag_Marshal(t *testing.T) {
 		URL:     String("url"),
 		Message: String("msg"),
 		Tagger: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("name"),
 			Email: String("email"),
 			Login: String("login"),
@@ -163,7 +163,7 @@ func TestCreateTagRequest_Marshal(t *testing.T) {
 		Object:  String("obj"),
 		Type:    String("type"),
 		Tagger: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("name"),
 			Email: String("email"),
 			Login: String("login"),
diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go
index 3e4b4694..24e0a758 100644
--- a/github/github-accessors_test.go
+++ b/github/github-accessors_test.go
@@ -3048,6 +3048,26 @@ func TestCodeScanningAlertEvent_GetSender(tt *testing.T) {
 	c.GetSender()
 }
 
+func TestCodeScanningAlertState_GetDismissedComment(tt *testing.T) {
+	var zeroValue string
+	c := &CodeScanningAlertState{DismissedComment: &zeroValue}
+	c.GetDismissedComment()
+	c = &CodeScanningAlertState{}
+	c.GetDismissedComment()
+	c = nil
+	c.GetDismissedComment()
+}
+
+func TestCodeScanningAlertState_GetDismissedReason(tt *testing.T) {
+	var zeroValue string
+	c := &CodeScanningAlertState{DismissedReason: &zeroValue}
+	c.GetDismissedReason()
+	c = &CodeScanningAlertState{}
+	c.GetDismissedReason()
+	c = nil
+	c.GetDismissedReason()
+}
+
 func TestCodeSearchResult_GetIncompleteResults(tt *testing.T) {
 	var zeroValue bool
 	c := &CodeSearchResult{IncompleteResults: &zeroValue}
@@ -3200,7 +3220,7 @@ func TestCombinedStatus_GetTotalCount(tt *testing.T) {
 }
 
 func TestComment_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	c := &Comment{CreatedAt: &zeroValue}
 	c.GetCreatedAt()
 	c = &Comment{}
@@ -3345,7 +3365,7 @@ func TestCommit_GetVerification(tt *testing.T) {
 }
 
 func TestCommitAuthor_GetDate(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	c := &CommitAuthor{Date: &zeroValue}
 	c.GetDate()
 	c = &CommitAuthor{}
@@ -3858,7 +3878,7 @@ func TestCommunityHealthMetrics_GetHealthPercentage(tt *testing.T) {
 }
 
 func TestCommunityHealthMetrics_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	c := &CommunityHealthMetrics{UpdatedAt: &zeroValue}
 	c.GetUpdatedAt()
 	c = &CommunityHealthMetrics{}
@@ -6363,7 +6383,7 @@ func TestEvent_GetActor(tt *testing.T) {
 }
 
 func TestEvent_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	e := &Event{CreatedAt: &zeroValue}
 	e.GetCreatedAt()
 	e = &Event{}
@@ -6744,7 +6764,7 @@ func TestGist_GetComments(tt *testing.T) {
 }
 
 func TestGist_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	g := &Gist{CreatedAt: &zeroValue}
 	g.GetCreatedAt()
 	g = &Gist{}
@@ -6841,7 +6861,7 @@ func TestGist_GetPublic(tt *testing.T) {
 }
 
 func TestGist_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	g := &Gist{UpdatedAt: &zeroValue}
 	g.GetUpdatedAt()
 	g = &Gist{}
@@ -6861,7 +6881,7 @@ func TestGistComment_GetBody(tt *testing.T) {
 }
 
 func TestGistComment_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	g := &GistComment{CreatedAt: &zeroValue}
 	g.GetCreatedAt()
 	g = &GistComment{}
@@ -7254,7 +7274,7 @@ func TestGPGKey_GetCanSign(tt *testing.T) {
 }
 
 func TestGPGKey_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	g := &GPGKey{CreatedAt: &zeroValue}
 	g.GetCreatedAt()
 	g = &GPGKey{}
@@ -7264,7 +7284,7 @@ func TestGPGKey_GetCreatedAt(tt *testing.T) {
 }
 
 func TestGPGKey_GetExpiresAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	g := &GPGKey{ExpiresAt: &zeroValue}
 	g.GetExpiresAt()
 	g = &GPGKey{}
@@ -7465,7 +7485,7 @@ func TestHook_GetActive(tt *testing.T) {
 }
 
 func TestHook_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	h := &Hook{CreatedAt: &zeroValue}
 	h.GetCreatedAt()
 	h = &Hook{}
@@ -7525,7 +7545,7 @@ func TestHook_GetType(tt *testing.T) {
 }
 
 func TestHook_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	h := &Hook{UpdatedAt: &zeroValue}
 	h.GetUpdatedAt()
 	h = &Hook{}
@@ -8625,7 +8645,7 @@ func TestInstallationRepositoriesEvent_GetSender(tt *testing.T) {
 }
 
 func TestInstallationToken_GetExpiresAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &InstallationToken{ExpiresAt: &zeroValue}
 	i.GetExpiresAt()
 	i = &InstallationToken{}
@@ -8689,7 +8709,7 @@ func TestInteractionRestriction_GetOrigin(tt *testing.T) {
 }
 
 func TestInvitation_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &Invitation{CreatedAt: &zeroValue}
 	i.GetCreatedAt()
 	i = &Invitation{}
@@ -8833,7 +8853,7 @@ func TestIssue_GetBody(tt *testing.T) {
 }
 
 func TestIssue_GetClosedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &Issue{ClosedAt: &zeroValue}
 	i.GetClosedAt()
 	i = &Issue{}
@@ -8870,7 +8890,7 @@ func TestIssue_GetCommentsURL(tt *testing.T) {
 }
 
 func TestIssue_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &Issue{CreatedAt: &zeroValue}
 	i.GetCreatedAt()
 	i = &Issue{}
@@ -9018,7 +9038,7 @@ func TestIssue_GetTitle(tt *testing.T) {
 }
 
 func TestIssue_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &Issue{UpdatedAt: &zeroValue}
 	i.GetUpdatedAt()
 	i = &Issue{}
@@ -9065,7 +9085,7 @@ func TestIssueComment_GetBody(tt *testing.T) {
 }
 
 func TestIssueComment_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueComment{CreatedAt: &zeroValue}
 	i.GetCreatedAt()
 	i = &IssueComment{}
@@ -9122,7 +9142,7 @@ func TestIssueComment_GetReactions(tt *testing.T) {
 }
 
 func TestIssueComment_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueComment{UpdatedAt: &zeroValue}
 	i.GetUpdatedAt()
 	i = &IssueComment{}
@@ -9239,7 +9259,7 @@ func TestIssueEvent_GetCommitID(tt *testing.T) {
 }
 
 func TestIssueEvent_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueEvent{CreatedAt: &zeroValue}
 	i.GetCreatedAt()
 	i = &IssueEvent{}
@@ -9365,7 +9385,7 @@ func TestIssueImport_GetClosed(tt *testing.T) {
 }
 
 func TestIssueImport_GetClosedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueImport{ClosedAt: &zeroValue}
 	i.GetClosedAt()
 	i = &IssueImport{}
@@ -9375,7 +9395,7 @@ func TestIssueImport_GetClosedAt(tt *testing.T) {
 }
 
 func TestIssueImport_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueImport{CreatedAt: &zeroValue}
 	i.GetCreatedAt()
 	i = &IssueImport{}
@@ -9395,7 +9415,7 @@ func TestIssueImport_GetMilestone(tt *testing.T) {
 }
 
 func TestIssueImport_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueImport{UpdatedAt: &zeroValue}
 	i.GetUpdatedAt()
 	i = &IssueImport{}
@@ -9455,7 +9475,7 @@ func TestIssueImportError_GetValue(tt *testing.T) {
 }
 
 func TestIssueImportResponse_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueImportResponse{CreatedAt: &zeroValue}
 	i.GetCreatedAt()
 	i = &IssueImportResponse{}
@@ -9525,7 +9545,7 @@ func TestIssueImportResponse_GetStatus(tt *testing.T) {
 }
 
 func TestIssueImportResponse_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	i := &IssueImportResponse{UpdatedAt: &zeroValue}
 	i.GetUpdatedAt()
 	i = &IssueImportResponse{}
@@ -11293,7 +11313,7 @@ func TestMigration_GetURL(tt *testing.T) {
 }
 
 func TestMilestone_GetClosedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	m := &Milestone{ClosedAt: &zeroValue}
 	m.GetClosedAt()
 	m = &Milestone{}
@@ -11313,7 +11333,7 @@ func TestMilestone_GetClosedIssues(tt *testing.T) {
 }
 
 func TestMilestone_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	m := &Milestone{CreatedAt: &zeroValue}
 	m.GetCreatedAt()
 	m = &Milestone{}
@@ -11340,7 +11360,7 @@ func TestMilestone_GetDescription(tt *testing.T) {
 }
 
 func TestMilestone_GetDueOn(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	m := &Milestone{DueOn: &zeroValue}
 	m.GetDueOn()
 	m = &Milestone{}
@@ -11430,7 +11450,7 @@ func TestMilestone_GetTitle(tt *testing.T) {
 }
 
 func TestMilestone_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	m := &Milestone{UpdatedAt: &zeroValue}
 	m.GetUpdatedAt()
 	m = &Milestone{}
@@ -11726,7 +11746,7 @@ func TestNotification_GetID(tt *testing.T) {
 }
 
 func TestNotification_GetLastReadAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	n := &Notification{LastReadAt: &zeroValue}
 	n.GetLastReadAt()
 	n = &Notification{}
@@ -11770,7 +11790,7 @@ func TestNotification_GetUnread(tt *testing.T) {
 }
 
 func TestNotification_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	n := &Notification{UpdatedAt: &zeroValue}
 	n.GetUpdatedAt()
 	n = &Notification{}
@@ -11930,7 +11950,7 @@ func TestOrganization_GetCompany(tt *testing.T) {
 }
 
 func TestOrganization_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	o := &Organization{CreatedAt: &zeroValue}
 	o.GetCreatedAt()
 	o = &Organization{}
@@ -12387,7 +12407,7 @@ func TestOrganization_GetType(tt *testing.T) {
 }
 
 func TestOrganization_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	o := &Organization{UpdatedAt: &zeroValue}
 	o.GetUpdatedAt()
 	o = &Organization{}
@@ -14932,7 +14952,7 @@ func TestPullRequest_GetChangedFiles(tt *testing.T) {
 }
 
 func TestPullRequest_GetClosedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequest{ClosedAt: &zeroValue}
 	p.GetClosedAt()
 	p = &PullRequest{}
@@ -14982,7 +15002,7 @@ func TestPullRequest_GetCommitsURL(tt *testing.T) {
 }
 
 func TestPullRequest_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequest{CreatedAt: &zeroValue}
 	p.GetCreatedAt()
 	p = &PullRequest{}
@@ -15126,7 +15146,7 @@ func TestPullRequest_GetMerged(tt *testing.T) {
 }
 
 func TestPullRequest_GetMergedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequest{MergedAt: &zeroValue}
 	p.GetMergedAt()
 	p = &PullRequest{}
@@ -15250,7 +15270,7 @@ func TestPullRequest_GetTitle(tt *testing.T) {
 }
 
 func TestPullRequest_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequest{UpdatedAt: &zeroValue}
 	p.GetUpdatedAt()
 	p = &PullRequest{}
@@ -15418,7 +15438,7 @@ func TestPullRequestComment_GetCommitID(tt *testing.T) {
 }
 
 func TestPullRequestComment_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequestComment{CreatedAt: &zeroValue}
 	p.GetCreatedAt()
 	p = &PullRequestComment{}
@@ -15605,7 +15625,7 @@ func TestPullRequestComment_GetStartSide(tt *testing.T) {
 }
 
 func TestPullRequestComment_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequestComment{UpdatedAt: &zeroValue}
 	p.GetUpdatedAt()
 	p = &PullRequestComment{}
@@ -15892,7 +15912,7 @@ func TestPullRequestReview_GetState(tt *testing.T) {
 }
 
 func TestPullRequestReview_GetSubmittedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	p := &PullRequestReview{SubmittedAt: &zeroValue}
 	p.GetSubmittedAt()
 	p = &PullRequestReview{}
@@ -18540,7 +18560,7 @@ func TestRepositoryComment_GetCommitID(tt *testing.T) {
 }
 
 func TestRepositoryComment_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	r := &RepositoryComment{CreatedAt: &zeroValue}
 	r.GetCreatedAt()
 	r = &RepositoryComment{}
@@ -18607,7 +18627,7 @@ func TestRepositoryComment_GetReactions(tt *testing.T) {
 }
 
 func TestRepositoryComment_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	r := &RepositoryComment{UpdatedAt: &zeroValue}
 	r.GetUpdatedAt()
 	r = &RepositoryComment{}
@@ -19701,7 +19721,7 @@ func TestRepoStatus_GetContext(tt *testing.T) {
 }
 
 func TestRepoStatus_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	r := &RepoStatus{CreatedAt: &zeroValue}
 	r.GetCreatedAt()
 	r = &RepoStatus{}
@@ -19768,7 +19788,7 @@ func TestRepoStatus_GetTargetURL(tt *testing.T) {
 }
 
 func TestRepoStatus_GetUpdatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	r := &RepoStatus{UpdatedAt: &zeroValue}
 	r.GetUpdatedAt()
 	r = &RepoStatus{}
@@ -22433,7 +22453,7 @@ func TestTimeline_GetCommitURL(tt *testing.T) {
 }
 
 func TestTimeline_GetCreatedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	t := &Timeline{CreatedAt: &zeroValue}
 	t.GetCreatedAt()
 	t = &Timeline{}
@@ -22542,7 +22562,7 @@ func TestTimeline_GetState(tt *testing.T) {
 }
 
 func TestTimeline_GetSubmittedAt(tt *testing.T) {
-	var zeroValue time.Time
+	var zeroValue Timestamp
 	t := &Timeline{SubmittedAt: &zeroValue}
 	t.GetSubmittedAt()
 	t = &Timeline{}
diff --git a/github/github-stringify_test.go b/github/github-stringify_test.go
index b60fd0ad..e2ec62b2 100644
--- a/github/github-stringify_test.go
+++ b/github/github-stringify_test.go
@@ -268,11 +268,12 @@ func TestCommit_String(t *testing.T) {
 
 func TestCommitAuthor_String(t *testing.T) {
 	v := CommitAuthor{
+		Date:  &Timestamp{},
 		Name:  String(""),
 		Email: String(""),
 		Login: String(""),
 	}
-	want := `github.CommitAuthor{Name:"", Email:"", Login:""}`
+	want := `github.CommitAuthor{Date:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Name:"", Email:"", Login:""}`
 	if got := v.String(); got != want {
 		t.Errorf("CommitAuthor.String = %v, want %v", got, want)
 	}
@@ -400,14 +401,15 @@ func TestEnterprise_String(t *testing.T) {
 
 func TestEvent_String(t *testing.T) {
 	v := Event{
-		Type:   String(""),
-		Public: Bool(false),
-		Repo:   &Repository{},
-		Actor:  &User{},
-		Org:    &Organization{},
-		ID:     String(""),
+		Type:      String(""),
+		Public:    Bool(false),
+		Repo:      &Repository{},
+		Actor:     &User{},
+		Org:       &Organization{},
+		CreatedAt: &Timestamp{},
+		ID:        String(""),
 	}
-	want := `github.Event{Type:"", Public:false, Repo:github.Repository{}, Actor:github.User{}, Org:github.Organization{}, ID:""}`
+	want := `github.Event{Type:"", Public:false, Repo:github.Repository{}, Actor:github.User{}, Org:github.Organization{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ID:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Event.String = %v, want %v", got, want)
 	}
@@ -424,8 +426,10 @@ func TestGPGKey_String(t *testing.T) {
 		CanEncryptComms:   Bool(false),
 		CanEncryptStorage: Bool(false),
 		CanCertify:        Bool(false),
+		CreatedAt:         &Timestamp{},
+		ExpiresAt:         &Timestamp{},
 	}
-	want := `github.GPGKey{ID:0, PrimaryKeyID:0, KeyID:"", RawKey:"", PublicKey:"", CanSign:false, CanEncryptComms:false, CanEncryptStorage:false, CanCertify:false}`
+	want := `github.GPGKey{ID:0, PrimaryKeyID:0, KeyID:"", RawKey:"", PublicKey:"", CanSign:false, CanEncryptComms:false, CanEncryptStorage:false, CanCertify:false, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ExpiresAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}`
 	if got := v.String(); got != want {
 		t.Errorf("GPGKey.String = %v, want %v", got, want)
 	}
@@ -441,9 +445,11 @@ func TestGist_String(t *testing.T) {
 		HTMLURL:     String(""),
 		GitPullURL:  String(""),
 		GitPushURL:  String(""),
+		CreatedAt:   &Timestamp{},
+		UpdatedAt:   &Timestamp{},
 		NodeID:      String(""),
 	}
-	want := `github.Gist{ID:"", Description:"", Public:false, Owner:github.User{}, Comments:0, HTMLURL:"", GitPullURL:"", GitPushURL:"", NodeID:""}`
+	want := `github.Gist{ID:"", Description:"", Public:false, Owner:github.User{}, Comments:0, HTMLURL:"", GitPullURL:"", GitPushURL:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Gist.String = %v, want %v", got, want)
 	}
@@ -451,12 +457,13 @@ func TestGist_String(t *testing.T) {
 
 func TestGistComment_String(t *testing.T) {
 	v := GistComment{
-		ID:   Int64(0),
-		URL:  String(""),
-		Body: String(""),
-		User: &User{},
+		ID:        Int64(0),
+		URL:       String(""),
+		Body:      String(""),
+		User:      &User{},
+		CreatedAt: &Timestamp{},
 	}
-	want := `github.GistComment{ID:0, URL:"", Body:"", User:github.User{}}`
+	want := `github.GistComment{ID:0, URL:"", Body:"", User:github.User{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}`
 	if got := v.String(); got != want {
 		t.Errorf("GistComment.String = %v, want %v", got, want)
 	}
@@ -580,16 +587,18 @@ func TestHeadCommit_String(t *testing.T) {
 
 func TestHook_String(t *testing.T) {
 	v := Hook{
-		URL:     String(""),
-		ID:      Int64(0),
-		Type:    String(""),
-		Name:    String(""),
-		TestURL: String(""),
-		PingURL: String(""),
-		Events:  []string{""},
-		Active:  Bool(false),
+		CreatedAt: &Timestamp{},
+		UpdatedAt: &Timestamp{},
+		URL:       String(""),
+		ID:        Int64(0),
+		Type:      String(""),
+		Name:      String(""),
+		TestURL:   String(""),
+		PingURL:   String(""),
+		Events:    []string{""},
+		Active:    Bool(false),
 	}
-	want := `github.Hook{URL:"", ID:0, Type:"", Name:"", TestURL:"", PingURL:"", Events:[""], Active:false}`
+	want := `github.Hook{CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, URL:"", ID:0, Type:"", Name:"", TestURL:"", PingURL:"", Events:[""], Active:false}`
 	if got := v.String(); got != want {
 		t.Errorf("Hook.String = %v, want %v", got, want)
 	}
@@ -696,13 +705,14 @@ func TestInvitation_String(t *testing.T) {
 		Login:             String(""),
 		Email:             String(""),
 		Role:              String(""),
+		CreatedAt:         &Timestamp{},
 		Inviter:           &User{},
 		TeamCount:         Int(0),
 		InvitationTeamURL: String(""),
 		FailedAt:          &Timestamp{},
 		FailedReason:      String(""),
 	}
-	want := `github.Invitation{ID:0, NodeID:"", Login:"", Email:"", Role:"", Inviter:github.User{}, TeamCount:0, InvitationTeamURL:"", FailedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, FailedReason:""}`
+	want := `github.Invitation{ID:0, NodeID:"", Login:"", Email:"", Role:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Inviter:github.User{}, TeamCount:0, InvitationTeamURL:"", FailedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, FailedReason:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Invitation.String = %v, want %v", got, want)
 	}
@@ -721,6 +731,9 @@ func TestIssue_String(t *testing.T) {
 		User:              &User{},
 		Assignee:          &User{},
 		Comments:          Int(0),
+		ClosedAt:          &Timestamp{},
+		CreatedAt:         &Timestamp{},
+		UpdatedAt:         &Timestamp{},
 		ClosedBy:          &User{},
 		URL:               String(""),
 		HTMLURL:           String(""),
@@ -735,7 +748,7 @@ func TestIssue_String(t *testing.T) {
 		NodeID:            String(""),
 		ActiveLockReason:  String(""),
 	}
-	want := `github.Issue{ID:0, Number:0, State:"", StateReason:"", Locked:false, Title:"", Body:"", AuthorAssociation:"", User:github.User{}, Assignee:github.User{}, Comments:0, ClosedBy:github.User{}, URL:"", HTMLURL:"", CommentsURL:"", EventsURL:"", LabelsURL:"", RepositoryURL:"", Milestone:github.Milestone{}, PullRequestLinks:github.PullRequestLinks{}, Repository:github.Repository{}, Reactions:github.Reactions{}, NodeID:"", ActiveLockReason:""}`
+	want := `github.Issue{ID:0, Number:0, State:"", StateReason:"", Locked:false, Title:"", Body:"", AuthorAssociation:"", User:github.User{}, Assignee:github.User{}, Comments:0, ClosedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ClosedBy:github.User{}, URL:"", HTMLURL:"", CommentsURL:"", EventsURL:"", LabelsURL:"", RepositoryURL:"", Milestone:github.Milestone{}, PullRequestLinks:github.PullRequestLinks{}, Repository:github.Repository{}, Reactions:github.Reactions{}, NodeID:"", ActiveLockReason:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Issue.String = %v, want %v", got, want)
 	}
@@ -748,12 +761,14 @@ func TestIssueComment_String(t *testing.T) {
 		Body:              String(""),
 		User:              &User{},
 		Reactions:         &Reactions{},
+		CreatedAt:         &Timestamp{},
+		UpdatedAt:         &Timestamp{},
 		AuthorAssociation: String(""),
 		URL:               String(""),
 		HTMLURL:           String(""),
 		IssueURL:          String(""),
 	}
-	want := `github.IssueComment{ID:0, NodeID:"", Body:"", User:github.User{}, Reactions:github.Reactions{}, AuthorAssociation:"", URL:"", HTMLURL:"", IssueURL:""}`
+	want := `github.IssueComment{ID:0, NodeID:"", Body:"", User:github.User{}, Reactions:github.Reactions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, AuthorAssociation:"", URL:"", HTMLURL:"", IssueURL:""}`
 	if got := v.String(); got != want {
 		t.Errorf("IssueComment.String = %v, want %v", got, want)
 	}
@@ -895,9 +910,13 @@ func TestMilestone_String(t *testing.T) {
 		Creator:      &User{},
 		OpenIssues:   Int(0),
 		ClosedIssues: Int(0),
+		CreatedAt:    &Timestamp{},
+		UpdatedAt:    &Timestamp{},
+		ClosedAt:     &Timestamp{},
+		DueOn:        &Timestamp{},
 		NodeID:       String(""),
 	}
-	want := `github.Milestone{URL:"", HTMLURL:"", LabelsURL:"", ID:0, Number:0, State:"", Title:"", Description:"", Creator:github.User{}, OpenIssues:0, ClosedIssues:0, NodeID:""}`
+	want := `github.Milestone{URL:"", HTMLURL:"", LabelsURL:"", ID:0, Number:0, State:"", Title:"", Description:"", Creator:github.User{}, OpenIssues:0, ClosedIssues:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ClosedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, DueOn:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, NodeID:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Milestone.String = %v, want %v", got, want)
 	}
@@ -975,6 +994,8 @@ func TestOrganization_String(t *testing.T) {
 		PublicGists:                          Int(0),
 		Followers:                            Int(0),
 		Following:                            Int(0),
+		CreatedAt:                            &Timestamp{},
+		UpdatedAt:                            &Timestamp{},
 		TotalPrivateRepos:                    Int(0),
 		OwnedPrivateRepos:                    Int(0),
 		PrivateGists:                         Int(0),
@@ -1013,7 +1034,7 @@ func TestOrganization_String(t *testing.T) {
 		PublicMembersURL: String(""),
 		ReposURL:         String(""),
 	}
-	want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersCanForkPrivateRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, WebCommitSignoffRequired:false, AdvancedSecurityEnabledForNewRepos:false, DependabotAlertsEnabledForNewRepos:false, DependabotSecurityUpdatesEnabledForNewRepos:false, DependencyGraphEnabledForNewRepos:false, SecretScanningEnabledForNewRepos:false, SecretScanningPushProtectionEnabledForNewRepos:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}`
+	want := `github.Organization{Login:"", ID:0, NodeID:"", AvatarURL:"", HTMLURL:"", Name:"", Company:"", Blog:"", Location:"", Email:"", TwitterUsername:"", Description:"", PublicRepos:0, PublicGists:0, Followers:0, Following:0, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, TotalPrivateRepos:0, OwnedPrivateRepos:0, PrivateGists:0, DiskUsage:0, Collaborators:0, BillingEmail:"", Type:"", Plan:github.Plan{}, TwoFactorRequirementEnabled:false, IsVerified:false, HasOrganizationProjects:false, HasRepositoryProjects:false, DefaultRepoPermission:"", DefaultRepoSettings:"", MembersCanCreateRepos:false, MembersCanCreatePublicRepos:false, MembersCanCreatePrivateRepos:false, MembersCanCreateInternalRepos:false, MembersCanForkPrivateRepos:false, MembersAllowedRepositoryCreationType:"", MembersCanCreatePages:false, MembersCanCreatePublicPages:false, MembersCanCreatePrivatePages:false, WebCommitSignoffRequired:false, AdvancedSecurityEnabledForNewRepos:false, DependabotAlertsEnabledForNewRepos:false, DependabotSecurityUpdatesEnabledForNewRepos:false, DependencyGraphEnabledForNewRepos:false, SecretScanningEnabledForNewRepos:false, SecretScanningPushProtectionEnabledForNewRepos:false, URL:"", EventsURL:"", HooksURL:"", IssuesURL:"", MembersURL:"", PublicMembersURL:"", ReposURL:""}`
 	if got := v.String(); got != want {
 		t.Errorf("Organization.String = %v, want %v", got, want)
 	}
@@ -1217,6 +1238,10 @@ func TestPullRequest_String(t *testing.T) {
 		Locked:              Bool(false),
 		Title:               String(""),
 		Body:                String(""),
+		CreatedAt:           &Timestamp{},
+		UpdatedAt:           &Timestamp{},
+		ClosedAt:            &Timestamp{},
+		MergedAt:            &Timestamp{},
 		User:                &User{},
 		Draft:               Bool(false),
 		Merged:              Bool(false),
@@ -1252,7 +1277,7 @@ func TestPullRequest_String(t *testing.T) {
 		Base:                &PullRequestBranch{},
 		ActiveLockReason:    String(""),
 	}
-	want := `github.PullRequest{ID:0, Number:0, State:"", Locked:false, Title:"", Body:"", User:github.User{}, Draft:false, Merged:false, Mergeable:false, MergeableState:"", MergedBy:github.User{}, MergeCommitSHA:"", Rebaseable:false, Comments:0, Commits:0, Additions:0, Deletions:0, ChangedFiles:0, URL:"", HTMLURL:"", IssueURL:"", StatusesURL:"", DiffURL:"", PatchURL:"", CommitsURL:"", CommentsURL:"", ReviewCommentsURL:"", ReviewCommentURL:"", ReviewComments:0, Assignee:github.User{}, Milestone:github.Milestone{}, MaintainerCanModify:false, AuthorAssociation:"", NodeID:"", AutoMerge:github.PullRequestAutoMerge{}, Links:github.PRLinks{}, Head:github.PullRequestBranch{}, Base:github.PullRequestBranch{}, ActiveLockReason:""}`
+	want := `github.PullRequest{ID:0, Number:0, State:"", Locked:false, Title:"", Body:"", CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, ClosedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, MergedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, User:github.User{}, Draft:false, Merged:false, Mergeable:false, MergeableState:"", MergedBy:github.User{}, MergeCommitSHA:"", Rebaseable:false, Comments:0, Commits:0, Additions:0, Deletions:0, ChangedFiles:0, URL:"", HTMLURL:"", IssueURL:"", StatusesURL:"", DiffURL:"", PatchURL:"", CommitsURL:"", CommentsURL:"", ReviewCommentsURL:"", ReviewCommentURL:"", ReviewComments:0, Assignee:github.User{}, Milestone:github.Milestone{}, MaintainerCanModify:false, AuthorAssociation:"", NodeID:"", AutoMerge:github.PullRequestAutoMerge{}, Links:github.PRLinks{}, Head:github.PullRequestBranch{}, Base:github.PullRequestBranch{}, ActiveLockReason:""}`
 	if got := v.String(); got != want {
 		t.Errorf("PullRequest.String = %v, want %v", got, want)
 	}
@@ -1279,12 +1304,14 @@ func TestPullRequestComment_String(t *testing.T) {
 		OriginalCommitID:    String(""),
 		User:                &User{},
 		Reactions:           &Reactions{},
+		CreatedAt:           &Timestamp{},
+		UpdatedAt:           &Timestamp{},
 		AuthorAssociation:   String(""),
 		URL:                 String(""),
 		HTMLURL:             String(""),
 		PullRequestURL:      String(""),
 	}
-	want := `github.PullRequestComment{ID:0, NodeID:"", InReplyTo:0, Body:"", Path:"", DiffHunk:"", PullRequestReviewID:0, Position:0, OriginalPosition:0, StartLine:0, Line:0, OriginalLine:0, OriginalStartLine:0, Side:"", StartSide:"", CommitID:"", OriginalCommitID:"", User:github.User{}, Reactions:github.Reactions{}, AuthorAssociation:"", URL:"", HTMLURL:"", PullRequestURL:""}`
+	want := `github.PullRequestComment{ID:0, NodeID:"", InReplyTo:0, Body:"", Path:"", DiffHunk:"", PullRequestReviewID:0, Position:0, OriginalPosition:0, StartLine:0, Line:0, OriginalLine:0, OriginalStartLine:0, Side:"", StartSide:"", CommitID:"", OriginalCommitID:"", User:github.User{}, Reactions:github.Reactions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, AuthorAssociation:"", URL:"", HTMLURL:"", PullRequestURL:""}`
 	if got := v.String(); got != want {
 		t.Errorf("PullRequestComment.String = %v, want %v", got, want)
 	}
@@ -1296,13 +1323,14 @@ func TestPullRequestReview_String(t *testing.T) {
 		NodeID:            String(""),
 		User:              &User{},
 		Body:              String(""),
+		SubmittedAt:       &Timestamp{},
 		CommitID:          String(""),
 		HTMLURL:           String(""),
 		PullRequestURL:    String(""),
 		State:             String(""),
 		AuthorAssociation: String(""),
 	}
-	want := `github.PullRequestReview{ID:0, NodeID:"", User:github.User{}, Body:"", CommitID:"", HTMLURL:"", PullRequestURL:"", State:"", AuthorAssociation:""}`
+	want := `github.PullRequestReview{ID:0, NodeID:"", User:github.User{}, Body:"", SubmittedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, CommitID:"", HTMLURL:"", PullRequestURL:"", State:"", AuthorAssociation:""}`
 	if got := v.String(); got != want {
 		t.Errorf("PullRequestReview.String = %v, want %v", got, want)
 	}
@@ -1480,8 +1508,10 @@ func TestRepoStatus_String(t *testing.T) {
 		Context:     String(""),
 		AvatarURL:   String(""),
 		Creator:     &User{},
+		CreatedAt:   &Timestamp{},
+		UpdatedAt:   &Timestamp{},
 	}
-	want := `github.RepoStatus{ID:0, NodeID:"", URL:"", State:"", TargetURL:"", Description:"", Context:"", AvatarURL:"", Creator:github.User{}}`
+	want := `github.RepoStatus{ID:0, NodeID:"", URL:"", State:"", TargetURL:"", Description:"", Context:"", AvatarURL:"", Creator:github.User{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}}`
 	if got := v.String(); got != want {
 		t.Errorf("RepoStatus.String = %v, want %v", got, want)
 	}
@@ -1607,11 +1637,13 @@ func TestRepositoryComment_String(t *testing.T) {
 		CommitID:  String(""),
 		User:      &User{},
 		Reactions: &Reactions{},
+		CreatedAt: &Timestamp{},
+		UpdatedAt: &Timestamp{},
 		Body:      String(""),
 		Path:      String(""),
 		Position:  Int(0),
 	}
-	want := `github.RepositoryComment{HTMLURL:"", URL:"", ID:0, NodeID:"", CommitID:"", User:github.User{}, Reactions:github.Reactions{}, Body:"", Path:"", Position:0}`
+	want := `github.RepositoryComment{HTMLURL:"", URL:"", ID:0, NodeID:"", CommitID:"", User:github.User{}, Reactions:github.Reactions{}, CreatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, UpdatedAt:github.Timestamp{0001-01-01 00:00:00 +0000 UTC}, Body:"", Path:"", Position:0}`
 	if got := v.String(); got != want {
 		t.Errorf("RepositoryComment.String = %v, want %v", got, want)
 	}
diff --git a/github/issue_import_test.go b/github/issue_import_test.go
index 3533b3ab..a86ead89 100644
--- a/github/issue_import_test.go
+++ b/github/issue_import_test.go
@@ -25,13 +25,13 @@ func TestIssueImportService_Create(t *testing.T) {
 		IssueImport: IssueImport{
 			Assignee:  String("developer"),
 			Body:      "Dummy description",
-			CreatedAt: &createdAt,
+			CreatedAt: &Timestamp{createdAt},
 			Labels:    []string{"l1", "l2"},
 			Milestone: Int(1),
 			Title:     "Dummy Issue",
 		},
 		Comments: []*Comment{{
-			CreatedAt: &createdAt,
+			CreatedAt: &Timestamp{createdAt},
 			Body:      "Comment body",
 		}},
 	}
@@ -142,7 +142,7 @@ func TestIssueImportService_CheckStatusSince(t *testing.T) {
 	})
 
 	ctx := context.Background()
-	got, _, err := client.IssueImport.CheckStatusSince(ctx, "o", "r", time.Now())
+	got, _, err := client.IssueImport.CheckStatusSince(ctx, "o", "r", Timestamp{time.Now()})
 	if err != nil {
 		t.Errorf("CheckStatusSince returned error: %v", err)
 	}
@@ -154,12 +154,12 @@ func TestIssueImportService_CheckStatusSince(t *testing.T) {
 
 	const methodName = "CheckStatusSince"
 	testBadOptions(t, methodName, func() (err error) {
-		_, _, err = client.IssueImport.CheckStatusSince(ctx, "\n", "\n", time.Now())
+		_, _, err = client.IssueImport.CheckStatusSince(ctx, "\n", "\n", Timestamp{time.Now()})
 		return err
 	})
 
 	testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) {
-		got, resp, err := client.IssueImport.CheckStatusSince(ctx, "o", "r", time.Now())
+		got, resp, err := client.IssueImport.CheckStatusSince(ctx, "o", "r", Timestamp{time.Now()})
 		if got != nil {
 			t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got)
 		}
@@ -179,7 +179,7 @@ func TestIssueImportService_CheckStatusSince_badResponse(t *testing.T) {
 	})
 
 	ctx := context.Background()
-	if _, _, err := client.IssueImport.CheckStatusSince(ctx, "o", "r", time.Now()); err == nil {
+	if _, _, err := client.IssueImport.CheckStatusSince(ctx, "o", "r", Timestamp{time.Now()}); err == nil {
 		t.Errorf("CheckStatusSince returned no error, want JSON err")
 	}
 }
@@ -189,7 +189,7 @@ func TestIssueImportService_CheckStatusSince_invalidOwner(t *testing.T) {
 	defer teardown()
 
 	ctx := context.Background()
-	_, _, err := client.IssueImport.CheckStatusSince(ctx, "%", "r", time.Now())
+	_, _, err := client.IssueImport.CheckStatusSince(ctx, "%", "r", Timestamp{time.Now()})
 	testURLParseError(t, err)
 }
 
@@ -240,8 +240,8 @@ func TestIssueImportResponse_Marshal(t *testing.T) {
 		URL:              String("url"),
 		ImportIssuesURL:  String("iiu"),
 		RepositoryURL:    String("ru"),
-		CreatedAt:        &referenceTime,
-		UpdatedAt:        &referenceTime,
+		CreatedAt:        &Timestamp{referenceTime},
+		UpdatedAt:        &Timestamp{referenceTime},
 		Message:          String("msg"),
 		DocumentationURL: String("durl"),
 		Errors: []*IssueImportError{
@@ -283,7 +283,7 @@ func TestComment_Marshal(t *testing.T) {
 	testJSONMarshal(t, &Comment{}, "{}")
 
 	u := &Comment{
-		CreatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
 		Body:      "body",
 	}
 
@@ -301,9 +301,9 @@ func TestIssueImport_Marshal(t *testing.T) {
 	u := &IssueImport{
 		Title:     "title",
 		Body:      "body",
-		CreatedAt: &referenceTime,
-		ClosedAt:  &referenceTime,
-		UpdatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
+		ClosedAt:  &Timestamp{referenceTime},
+		UpdatedAt: &Timestamp{referenceTime},
 		Assignee:  String("a"),
 		Milestone: Int(1),
 		Closed:    Bool(false),
@@ -334,9 +334,9 @@ func TestIssueImportRequest_Marshal(t *testing.T) {
 		IssueImport: IssueImport{
 			Title:     "title",
 			Body:      "body",
-			CreatedAt: &referenceTime,
-			ClosedAt:  &referenceTime,
-			UpdatedAt: &referenceTime,
+			CreatedAt: &Timestamp{referenceTime},
+			ClosedAt:  &Timestamp{referenceTime},
+			UpdatedAt: &Timestamp{referenceTime},
 			Assignee:  String("a"),
 			Milestone: Int(1),
 			Closed:    Bool(false),
@@ -344,7 +344,7 @@ func TestIssueImportRequest_Marshal(t *testing.T) {
 		},
 		Comments: []*Comment{
 			{
-				CreatedAt: &referenceTime,
+				CreatedAt: &Timestamp{referenceTime},
 				Body:      "body",
 			},
 		},
diff --git a/github/issues_comments_test.go b/github/issues_comments_test.go
index 7780676f..d35deeda 100644
--- a/github/issues_comments_test.go
+++ b/github/issues_comments_test.go
@@ -323,8 +323,8 @@ func TestIssueComment_Marshal(t *testing.T) {
 			SuspendedAt:     &Timestamp{referenceTime},
 		},
 		Reactions:         &Reactions{TotalCount: Int(1)},
-		CreatedAt:         &referenceTime,
-		UpdatedAt:         &referenceTime,
+		CreatedAt:         &Timestamp{referenceTime},
+		UpdatedAt:         &Timestamp{referenceTime},
 		AuthorAssociation: String("aa"),
 		URL:               String("url"),
 		HTMLURL:           String("hurl"),
diff --git a/github/issues_events_test.go b/github/issues_events_test.go
index ba21565f..1d8d3233 100644
--- a/github/issues_events_test.go
+++ b/github/issues_events_test.go
@@ -193,7 +193,7 @@ func TestIssueEvent_Marshal(t *testing.T) {
 			SuspendedAt:     &Timestamp{referenceTime},
 		},
 		Event:     String("event"),
-		CreatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
 		Issue:     &Issue{ID: Int64(1)},
 		Assignee: &User{
 			Login:           String("l"),
diff --git a/github/issues_milestones_test.go b/github/issues_milestones_test.go
index 86d1bddc..b6472f34 100644
--- a/github/issues_milestones_test.go
+++ b/github/issues_milestones_test.go
@@ -284,10 +284,10 @@ func TestMilestone_Marshal(t *testing.T) {
 		},
 		OpenIssues:   Int(1),
 		ClosedIssues: Int(1),
-		CreatedAt:    &referenceTime,
-		UpdatedAt:    &referenceTime,
-		ClosedAt:     &referenceTime,
-		DueOn:        &referenceTime,
+		CreatedAt:    &Timestamp{referenceTime},
+		UpdatedAt:    &Timestamp{referenceTime},
+		ClosedAt:     &Timestamp{referenceTime},
+		DueOn:        &Timestamp{referenceTime},
 		NodeID:       String("nid"),
 	}
 
diff --git a/github/issues_test.go b/github/issues_test.go
index e2cf0639..37b2c2ad 100644
--- a/github/issues_test.go
+++ b/github/issues_test.go
@@ -556,9 +556,9 @@ func TestIssue_Marshal(t *testing.T) {
 		Labels:            []*Label{{ID: Int64(1)}},
 		Assignee:          &User{ID: Int64(1)},
 		Comments:          Int(1),
-		ClosedAt:          &referenceTime,
-		CreatedAt:         &referenceTime,
-		UpdatedAt:         &referenceTime,
+		ClosedAt:          &Timestamp{referenceTime},
+		CreatedAt:         &Timestamp{referenceTime},
+		UpdatedAt:         &Timestamp{referenceTime},
 		ClosedBy:          &User{ID: Int64(1)},
 		URL:               String("url"),
 		HTMLURL:           String("hurl"),
diff --git a/github/issues_timeline_test.go b/github/issues_timeline_test.go
index 17ae6187..27c7c115 100644
--- a/github/issues_timeline_test.go
+++ b/github/issues_timeline_test.go
@@ -126,7 +126,7 @@ func TestTimeline_Marshal(t *testing.T) {
 		},
 		Event:     String("event"),
 		CommitID:  String("cid"),
-		CreatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
 		Label:     &Label{ID: Int64(1)},
 		Assignee: &User{
 			Login:           String("l"),
diff --git a/github/orgs_hooks_test.go b/github/orgs_hooks_test.go
index d4d4c54e..0fe45565 100644
--- a/github/orgs_hooks_test.go
+++ b/github/orgs_hooks_test.go
@@ -66,7 +66,7 @@ func TestOrganizationsService_CreateHook(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	input := &Hook{CreatedAt: &referenceTime}
+	input := &Hook{CreatedAt: &Timestamp{referenceTime}}
 
 	mux.HandleFunc("/orgs/o/hooks", func(w http.ResponseWriter, r *http.Request) {
 		v := new(createHookRequest)
diff --git a/github/orgs_members_test.go b/github/orgs_members_test.go
index adc14f5b..0b5068e5 100644
--- a/github/orgs_members_test.go
+++ b/github/orgs_members_test.go
@@ -590,7 +590,7 @@ func TestOrganizationsService_ListPendingOrgInvitations(t *testing.T) {
 			Login:     String("monalisa"),
 			Email:     String("octocat@github.com"),
 			Role:      String("direct_member"),
-			CreatedAt: &createdAt,
+			CreatedAt: &Timestamp{createdAt},
 			Inviter: &User{
 				Login:             String("other_user"),
 				ID:                Int64(1),
@@ -805,7 +805,7 @@ func TestOrganizationsService_ListFailedOrgInvitations(t *testing.T) {
 			Role:         String("direct_member"),
 			FailedAt:     &Timestamp{time.Date(2017, time.January, 2, 1, 10, 0, 0, time.UTC)},
 			FailedReason: String("the reason"),
-			CreatedAt:    &createdAt,
+			CreatedAt:    &Timestamp{createdAt},
 			Inviter: &User{
 				Login:             String("other_user"),
 				ID:                Int64(1),
diff --git a/github/pulls_comments_test.go b/github/pulls_comments_test.go
index cd6f19c1..47d08d2b 100644
--- a/github/pulls_comments_test.go
+++ b/github/pulls_comments_test.go
@@ -20,8 +20,8 @@ import (
 func TestPullComments_Marshal(t *testing.T) {
 	testJSONMarshal(t, &PullRequestComment{}, "{}")
 
-	createdAt := time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)
-	updatedAt := time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)
+	createdAt := Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}
+	updatedAt := Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}
 	reactions := &Reactions{
 		TotalCount: Int(1),
 		PlusOne:    Int(1),
diff --git a/github/pulls_reviews_test.go b/github/pulls_reviews_test.go
index aacc0368..7931ba05 100644
--- a/github/pulls_reviews_test.go
+++ b/github/pulls_reviews_test.go
@@ -739,7 +739,7 @@ func TestPullRequestReview_Marshal(t *testing.T) {
 			SuspendedAt:     &Timestamp{referenceTime},
 		},
 		Body:              String("body"),
-		SubmittedAt:       &referenceTime,
+		SubmittedAt:       &Timestamp{referenceTime},
 		CommitID:          String("cid"),
 		HTMLURL:           String("hurl"),
 		PullRequestURL:    String("prurl"),
diff --git a/github/pulls_test.go b/github/pulls_test.go
index b4981938..590483fa 100644
--- a/github/pulls_test.go
+++ b/github/pulls_test.go
@@ -1162,10 +1162,10 @@ func TestPullRequest_Marshal(t *testing.T) {
 		Locked:    Bool(false),
 		Title:     String("title"),
 		Body:      String("body"),
-		CreatedAt: &referenceTime,
-		UpdatedAt: &referenceTime,
-		ClosedAt:  &referenceTime,
-		MergedAt:  &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
+		UpdatedAt: &Timestamp{referenceTime},
+		ClosedAt:  &Timestamp{referenceTime},
+		MergedAt:  &Timestamp{referenceTime},
 		Labels:    []*Label{{ID: Int64(1)}},
 		User: &User{
 			Login:           String("l"),
diff --git a/github/pulls_threads_test.go b/github/pulls_threads_test.go
index 6df28404..7c3c8619 100644
--- a/github/pulls_threads_test.go
+++ b/github/pulls_threads_test.go
@@ -13,8 +13,8 @@ import (
 func TestPullRequestThread_Marshal(t *testing.T) {
 	testJSONMarshal(t, &PullRequestThread{}, "{}")
 
-	createdAt := time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)
-	updatedAt := time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)
+	createdAt := Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}
+	updatedAt := Timestamp{time.Date(2002, time.February, 10, 15, 30, 0, 0, time.UTC)}
 	reactions := &Reactions{
 		TotalCount: Int(1),
 		PlusOne:    Int(1),
diff --git a/github/repos_comments_test.go b/github/repos_comments_test.go
index 3dbc10cb..b3579bf5 100644
--- a/github/repos_comments_test.go
+++ b/github/repos_comments_test.go
@@ -335,8 +335,8 @@ func TestRepositoryComment_Marshal(t *testing.T) {
 			Eyes:       Int(1),
 			URL:        String("u"),
 		},
-		CreatedAt: &referenceTime,
-		UpdatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
+		UpdatedAt: &Timestamp{referenceTime},
 		Body:      String("body"),
 		Path:      String("path"),
 		Position:  Int(1),
diff --git a/github/repos_commits_test.go b/github/repos_commits_test.go
index 1ce068c6..c5c13278 100644
--- a/github/repos_commits_test.go
+++ b/github/repos_commits_test.go
@@ -672,13 +672,13 @@ func TestBranchCommit_Marshal(t *testing.T) {
 		Commit: &Commit{
 			SHA: String("s"),
 			Author: &CommitAuthor{
-				Date:  &referenceTime,
+				Date:  &Timestamp{referenceTime},
 				Name:  String("n"),
 				Email: String("e"),
 				Login: String("u"),
 			},
 			Committer: &CommitAuthor{
-				Date:  &referenceTime,
+				Date:  &Timestamp{referenceTime},
 				Name:  String("n"),
 				Email: String("e"),
 				Login: String("u"),
diff --git a/github/repos_community_health_test.go b/github/repos_community_health_test.go
index 0031cdb7..6ff88bda 100644
--- a/github/repos_community_health_test.go
+++ b/github/repos_community_health_test.go
@@ -76,7 +76,7 @@ func TestRepositoriesService_GetCommunityHealthMetrics(t *testing.T) {
 	want := &CommunityHealthMetrics{
 		HealthPercentage:      Int(100),
 		Description:           String("My first repository on GitHub!"),
-		UpdatedAt:             &updatedAt,
+		UpdatedAt:             &Timestamp{updatedAt},
 		ContentReportsEnabled: Bool(true),
 		Files: &CommunityHealthFiles{
 			CodeOfConduct: &Metric{
@@ -310,7 +310,7 @@ func TestCommunityHealthMetrics_Marshal(t *testing.T) {
 				HTMLURL: String("hurl"),
 			},
 		},
-		UpdatedAt:             &referenceTime,
+		UpdatedAt:             &Timestamp{referenceTime},
 		ContentReportsEnabled: Bool(true),
 	}
 
diff --git a/github/repos_contents_test.go b/github/repos_contents_test.go
index f5de5570..db3efb91 100644
--- a/github/repos_contents_test.go
+++ b/github/repos_contents_test.go
@@ -838,13 +838,13 @@ func TestRepositoryContentResponse_Marshal(t *testing.T) {
 		Commit: Commit{
 			SHA: String("s"),
 			Author: &CommitAuthor{
-				Date:  &referenceTime,
+				Date:  &Timestamp{referenceTime},
 				Name:  String("n"),
 				Email: String("e"),
 				Login: String("u"),
 			},
 			Committer: &CommitAuthor{
-				Date:  &referenceTime,
+				Date:  &Timestamp{referenceTime},
 				Name:  String("n"),
 				Email: String("e"),
 				Login: String("u"),
@@ -958,13 +958,13 @@ func TestRepositoryContentFileOptions_Marshal(t *testing.T) {
 		SHA:     String("type"),
 		Branch:  String("type"),
 		Author: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("name"),
 			Email: String("email"),
 			Login: String("login"),
 		},
 		Committer: &CommitAuthor{
-			Date:  &referenceTime,
+			Date:  &Timestamp{referenceTime},
 			Name:  String("name"),
 			Email: String("email"),
 			Login: String("login"),
diff --git a/github/repos_hooks_test.go b/github/repos_hooks_test.go
index 3c6ee6fa..82e8b554 100644
--- a/github/repos_hooks_test.go
+++ b/github/repos_hooks_test.go
@@ -19,7 +19,7 @@ func TestRepositoriesService_CreateHook(t *testing.T) {
 	client, mux, _, teardown := setup()
 	defer teardown()
 
-	input := &Hook{CreatedAt: &referenceTime}
+	input := &Hook{CreatedAt: &Timestamp{referenceTime}}
 
 	mux.HandleFunc("/repos/o/r/hooks", func(w http.ResponseWriter, r *http.Request) {
 		v := new(createHookRequest)
@@ -525,8 +525,8 @@ func TestBranchHook_Marshal(t *testing.T) {
 	testJSONMarshal(t, &Hook{}, "{}")
 
 	v := &Hook{
-		CreatedAt: &referenceTime,
-		UpdatedAt: &referenceTime,
+		CreatedAt: &Timestamp{referenceTime},
+		UpdatedAt: &Timestamp{referenceTime},
 		URL:       String("url"),
 		ID:        Int64(1),
 		Type:      String("type"),
diff --git a/github/repos_statuses_test.go b/github/repos_statuses_test.go
index 62fe3336..c9e03acb 100644
--- a/github/repos_statuses_test.go
+++ b/github/repos_statuses_test.go
@@ -163,8 +163,8 @@ func TestRepoStatus_Marshal(t *testing.T) {
 		Context:     String("ctx"),
 		AvatarURL:   String("aurl"),
 		Creator:     &User{ID: Int64(1)},
-		CreatedAt:   &referenceTime,
-		UpdatedAt:   &referenceTime,
+		CreatedAt:   &Timestamp{referenceTime},
+		UpdatedAt:   &Timestamp{referenceTime},
 	}
 
 	want := `{
@@ -205,8 +205,8 @@ func TestCombinedStatus_Marshal(t *testing.T) {
 				Context:     String("ctx"),
 				AvatarURL:   String("aurl"),
 				Creator:     &User{ID: Int64(1)},
-				CreatedAt:   &referenceTime,
-				UpdatedAt:   &referenceTime,
+				CreatedAt:   &Timestamp{referenceTime},
+				UpdatedAt:   &Timestamp{referenceTime},
 			},
 		},
 		CommitURL:     String("curl"),
diff --git a/github/search_test.go b/github/search_test.go
index 8998681e..b7461753 100644
--- a/github/search_test.go
+++ b/github/search_test.go
@@ -788,9 +788,9 @@ func TestIssuesSearchResult_Marshal(t *testing.T) {
 				Labels:            []*Label{{ID: Int64(1)}},
 				Assignee:          &User{ID: Int64(1)},
 				Comments:          Int(1),
-				ClosedAt:          &referenceTime,
-				CreatedAt:         &referenceTime,
-				UpdatedAt:         &referenceTime,
+				ClosedAt:          &Timestamp{referenceTime},
+				CreatedAt:         &Timestamp{referenceTime},
+				UpdatedAt:         &Timestamp{referenceTime},
 				ClosedBy:          &User{ID: Int64(1)},
 				URL:               String("url"),
 				HTMLURL:           String("hurl"),
diff --git a/github/teams_test.go b/github/teams_test.go
index 6085eac1..93e658af 100644
--- a/github/teams_test.go
+++ b/github/teams_test.go
@@ -1709,7 +1709,7 @@ func TestInvitation_Marshal(t *testing.T) {
 		Login:             String("login123"),
 		Email:             String("go@github.com"),
 		Role:              String("developer"),
-		CreatedAt:         &referenceTime,
+		CreatedAt:         &Timestamp{referenceTime},
 		TeamCount:         Int(99),
 		InvitationTeamURL: String("url"),
 	}
diff --git a/github/users_gpg_keys_test.go b/github/users_gpg_keys_test.go
index 2cef7522..79ebd2d6 100644
--- a/github/users_gpg_keys_test.go
+++ b/github/users_gpg_keys_test.go
@@ -11,7 +11,6 @@ import (
 	"fmt"
 	"net/http"
 	"testing"
-	"time"
 
 	"github.com/google/go-cmp/cmp"
 )
@@ -210,7 +209,7 @@ func TestGPGEmail_Marshal(t *testing.T) {
 func TestGPGKey_Marshal(t *testing.T) {
 	testJSONMarshal(t, &GPGKey{}, "{}")
 
-	ti := &time.Time{}
+	ti := &Timestamp{}
 
 	g := &GPGKey{
 		ID:           Int64(1),