File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
app/android/src/reactnative/java/io/invertase/firebase/common Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -97,12 +97,10 @@ public static WritableMap getExceptionMap(Exception exception) {
97
97
}
98
98
99
99
public static String timestampToUTC (long timestamp ) {
100
- Calendar calendar = Calendar .getInstance ();
101
100
long millisTimestamp = timestamp * 1000 ;
102
- Date date = new Date (millisTimestamp + calendar .getTimeZone ().getOffset (millisTimestamp ));
103
- SimpleDateFormat format = new SimpleDateFormat ("yyyy-MM-dd'T'HH:mm:ss'Z'" , Locale .US );
101
+ SimpleDateFormat format = new SimpleDateFormat ("yyyy-MM-dd'T'HH:mm:ss'Z'" );
104
102
format .setTimeZone (TimeZone .getTimeZone ("UTC" ));
105
- return format .format (date );
103
+ return format .format (millisTimestamp );
106
104
}
107
105
108
106
/**
Original file line number Diff line number Diff line change @@ -71,8 +71,12 @@ describe('auth().currentUser', function () {
71
71
72
72
tokenResult . claims . should . be . a . Object ( ) ;
73
73
tokenResult . claims . iat . should . be . a . Number ( ) ;
74
+ tokenResult . claims . exp . should . be . a . Number ( ) ;
74
75
tokenResult . claims . iss . should . be . a . String ( ) ;
75
76
77
+ new Date ( tokenResult . issuedAtTime ) . getTime ( ) . should . equal ( tokenResult . claims . iat * 1000 ) ;
78
+ new Date ( tokenResult . expirationTime ) . getTime ( ) . should . equal ( tokenResult . claims . exp * 1000 ) ;
79
+
76
80
tokenResult . signInProvider . should . equal ( 'password' ) ;
77
81
tokenResult . token . length . should . be . greaterThan ( 24 ) ;
78
82
You can’t perform that action at this time.
0 commit comments