fix(identity): Convert datetimes to milliseconds

This commit is contained in:
Jackie Luo 2016-06-14 15:03:35 -07:00
parent 5cb595e9fe
commit 3b9d38e493
2 changed files with 2 additions and 2 deletions

View file

@ -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>
)

View file

@ -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;