Skip to content

Commit

Permalink
Merge pull request #4956 from brave/pr4953_android_promo_expiry_1.7.x
Browse files Browse the repository at this point in the history
Rewards page: promotion expiry date is not correct.Issue #8692 (uplift to 1.7.x)
  • Loading branch information
kjozwiak authored Mar 16, 2020
2 parents 61100f9 + a67d8a2 commit e1dfa4c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1159,8 +1159,7 @@ public void OnFetchPromotions() {
String toInsert = "<b><font color=#ffffff>" + grant[0] + " BAT</font></b> ";

if (grant[2].equals(BraveRewardsPanelPopup.ADS_GRANT_TYPE) == false) {
TimeZone utc = TimeZone.getTimeZone("UTC");
Calendar calTime = Calendar.getInstance(utc);
Calendar calTime = Calendar.getInstance();
calTime.setTimeInMillis(Long.parseLong(grant[1]) * 1000);
String date = Integer.toString(calTime.get(Calendar.MONTH) + 1) + "/" +
Integer.toString(calTime.get(Calendar.DAY_OF_MONTH)) + "/" +
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class PageWallet extends React.Component<Props, State> {
return claimedPromotions.map((promotion: Rewards.Promotion) => {
return {
amount: promotion.amount,
expiresAt: new Date(promotion.expiresAt * 1000).toLocaleDateString(),
expiresAt: new Date(promotion.expiresAt).toLocaleDateString(),
type: promotion.type || 0
}
})
Expand Down

0 comments on commit e1dfa4c

Please sign in to comment.