mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 10:12:00 +08:00
fix(identity): Convert datetimes to milliseconds
This commit is contained in:
parent
5cb595e9fe
commit
3b9d38e493
2 changed files with 2 additions and 2 deletions
|
@ -121,7 +121,7 @@ class PreferencesIdentity extends React.Component {
|
|||
return (
|
||||
<div className="row payment-row">
|
||||
<div>
|
||||
Your subscription will renew on {new Date(identity.valid_until).toLocaleDateString()}. Enjoy N1!
|
||||
Your subscription will renew on {new Date(identity.valid_until * 1000).toLocaleDateString()}. Enjoy N1!
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -83,7 +83,7 @@ class IdentityStore extends NylasStore {
|
|||
if (!this._identity || (this._identity.valid_until === null)) {
|
||||
return State.Trialing;
|
||||
}
|
||||
if (new Date(this._identity.valid_until) < new Date()) {
|
||||
if (new Date(this._identity.valid_until * 1000) < new Date()) {
|
||||
return State.Lapsed;
|
||||
}
|
||||
return State.Valid;
|
||||
|
|
Loading…
Reference in a new issue