Skip to content

Commit

Permalink
fix: Expiration Date time parsing format for .cn (#13)
Browse files Browse the repository at this point in the history
* fix: Expiration Date time parsing format for .cn

* chore: use string date time foramt for CN
  • Loading branch information
shadow3x3x3 authored and TwiN committed Aug 22, 2023
1 parent 5c34d85 commit eec7f6b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions whois.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,8 @@ func (c *Client) QueryAndParse(domain string) (*Response, error) {
switch {
case strings.HasSuffix(domain, ".br"):
response.ExpirationDate, _ = time.Parse("20060102", strings.ToUpper(value))
case strings.HasSuffix(domain, ".cn"):
response.ExpirationDate, _ = time.Parse("2006-01-02 15:04:05", strings.ToUpper(value))
default:
response.ExpirationDate, _ = time.Parse(time.RFC3339, strings.ToUpper(value))
}
Expand Down

0 comments on commit eec7f6b

Please sign in to comment.