Skip to content

Commit

Permalink
fix: fix replace time zone bug
Browse files Browse the repository at this point in the history
if timezone is +0000 then cause error +:0000 not +00:00
  • Loading branch information
iamkun committed Apr 12, 2018
1 parent a5a2208 commit 6f62a7c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class Dayjs {
case 'ss':
return padStart(String(this.mSecond), 2, '0')
case 'Z':
return this.timeZoneString.replace('00', ':00')
return `${this.timeZoneString.slice(0, -2)}:00`
case 'ZZ':
return this.timeZoneString
default:
Expand Down

0 comments on commit 6f62a7c

Please sign in to comment.