what-the-bank/sources/o/glZ.java

77 lines
2.4 KiB
Java

package o;
import com.google.android.gms.auth.api.credentials.CredentialsApi;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
/* loaded from: classes6.dex */
public final class glZ extends AbstractC15242glD {
private static final TimeZone b;
private static final DateFormat c;
public Date e;
static {
TimeZone timeZone = TimeZone.getTimeZone("GMT");
b = timeZone;
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd");
c = simpleDateFormat;
simpleDateFormat.setTimeZone(timeZone);
}
private glZ(glS gls) {
super(gls);
}
/* JADX INFO: Access modifiers changed from: package-private */
public glZ(glS gls, Date date) {
this(gls);
Calendar calendar = Calendar.getInstance(b);
calendar.setTimeInMillis(date.getTime());
int i = calendar.get(1);
int i2 = calendar.get(2);
int i3 = calendar.get(5);
calendar.clear();
calendar.set(i, i2, i3);
this.e = calendar.getTime();
}
/* JADX INFO: Access modifiers changed from: package-private */
public glZ(glS gls, byte[] bArr) {
this(gls);
if (bArr.length != 6) {
StringBuilder sb = new StringBuilder("data argument must have length 6, was ");
sb.append(bArr.length);
throw new IllegalArgumentException(sb.toString());
}
int i = (bArr[0] * 10) + CredentialsApi.CREDENTIAL_PICKER_REQUEST_CODE + bArr[1];
int i2 = ((bArr[2] * 10) + bArr[3]) - 1;
int i3 = (bArr[4] * 10) + bArr[5];
Calendar calendar = Calendar.getInstance(b);
calendar.clear();
if (gls == glS.EFFECTIVE_DATE) {
calendar.set(i, i2, i3, 0, 0, 0);
} else {
calendar.set(i, i2, i3, 23, 59, 59);
}
this.e = calendar.getTime();
}
@Override // o.AbstractC15242glD
protected final byte[] a() {
Calendar calendar = Calendar.getInstance(b);
calendar.setTimeInMillis(this.e.getTime());
int i = calendar.get(1) - 2000;
int i2 = calendar.get(2) + 1;
int i3 = calendar.get(5);
return new byte[]{(byte) (i / 10), (byte) (i % 10), (byte) (i2 / 10), (byte) (i2 % 10), (byte) (i3 / 10), (byte) (i3 % 10)};
}
@Override // o.AbstractC15242glD
protected final String d() {
return c.format(this.e);
}
}