func (t *Timestamp) UnmarshalJSON(b []byte) error {
	s := strings.Trim(string(b), "\"")
	if s == "null" {
		return nil
	}
	parsedTime, err := time.Parse(timestampFormat, s)
	if err != nil {
		return err
	}
	t.Time = parsedTime
	return nil
}
UnmarshalJSON parses a JSON encoded Scryfall timestamp and stores the result.
package scryfall
import (
	"bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"io"
	"net/http"
	"net/url"
	"strings"
	"time"
	"go.uber.org/ratelimit"
)
const (
	defaultBaseURL = "https://api.scryfall.com"
	defaultTimeout = 30 * time.Second
	defaultReqPerSecond = 10
	userAgent      = "go-scryfall"
	dateFormat      = "2006-01-02"
	timestampFormat = "2006-01-02T15:04:05.999Z07:00"
)
var ErrMultipleSecrets = errors.New("multiple secrets configured")
type Color string
const (
	ColorWhite Color = "W"
	ColorBlue Color = "U"
	ColorBlack Color = "B"
	ColorRed Color = "R"
	ColorGreen Color = "G"
)
type Date struct {
	time.Time
}
func (d *Date) UnmarshalJSON(b []byte) error {
	s := strings.Trim(string(b), "\"")
	if s == "null" {
		return nil
	}
	parsedTime, err := time.ParseInLocation(dateFormat, s, time.FixedZone("UTC-8", -8*60*60))
	if err != nil {
		return err
	}
	d.Time = parsedTime
	return nil
}
type Timestamp struct {
	time.Time
}