105 lines
2.7 KiB
Java
105 lines
2.7 KiB
Java
package o;
|
|
|
|
import java.io.Serializable;
|
|
import java.util.Arrays;
|
|
import java.util.GregorianCalendar;
|
|
import java.util.TimeZone;
|
|
import java.util.regex.Pattern;
|
|
import org.bouncycastle.pqc.math.linearalgebra.Matrix;
|
|
|
|
/* loaded from: classes2.dex */
|
|
public final class RMP implements Serializable {
|
|
private static final TimeZone d = TimeZone.getTimeZone("GMT");
|
|
private final boolean a;
|
|
private final long b;
|
|
private final int c;
|
|
|
|
static {
|
|
Pattern.compile("(\\d{4})-(\\d{2})-(\\d{2})([Tt](\\d{2}):(\\d{2}):(\\d{2})(\\.\\d{1,9})?)?([Zz]|([+-])(\\d{2}):(\\d{2}))?");
|
|
}
|
|
|
|
public RMP(long j) {
|
|
this();
|
|
}
|
|
|
|
private RMP() {
|
|
this.a = false;
|
|
this.b = 0L;
|
|
this.c = TimeZone.getDefault().getOffset(0L) / 60000;
|
|
}
|
|
|
|
public final String d() {
|
|
StringBuilder sb = new StringBuilder();
|
|
GregorianCalendar gregorianCalendar = new GregorianCalendar(d);
|
|
gregorianCalendar.setTimeInMillis(this.c * 60000);
|
|
a(sb, gregorianCalendar.get(1), 4);
|
|
sb.append('-');
|
|
a(sb, gregorianCalendar.get(2) + 1, 2);
|
|
sb.append('-');
|
|
a(sb, gregorianCalendar.get(5), 2);
|
|
sb.append('T');
|
|
a(sb, gregorianCalendar.get(11), 2);
|
|
sb.append(':');
|
|
a(sb, gregorianCalendar.get(12), 2);
|
|
sb.append(':');
|
|
a(sb, gregorianCalendar.get(13), 2);
|
|
if (gregorianCalendar.isSet(14)) {
|
|
sb.append('.');
|
|
a(sb, gregorianCalendar.get(14), 3);
|
|
}
|
|
int i = this.c;
|
|
if (i == 0) {
|
|
sb.append(Matrix.MATRIX_TYPE_ZERO);
|
|
} else {
|
|
if (i > 0) {
|
|
sb.append('+');
|
|
} else {
|
|
sb.append('-');
|
|
i = -i;
|
|
}
|
|
a(sb, i / 60, 2);
|
|
sb.append(':');
|
|
a(sb, i % 60, 2);
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
public final String toString() {
|
|
return d();
|
|
}
|
|
|
|
public final boolean equals(Object obj) {
|
|
if (obj == this) {
|
|
return true;
|
|
}
|
|
if (!(obj instanceof RMP)) {
|
|
return false;
|
|
}
|
|
RMP rmp = (RMP) obj;
|
|
boolean z = rmp.a;
|
|
return this.b == rmp.b && this.c == rmp.c;
|
|
}
|
|
|
|
public final int hashCode() {
|
|
return Arrays.hashCode(new long[]{this.b, 0, this.c});
|
|
}
|
|
|
|
private static void a(StringBuilder sb, int i, int i2) {
|
|
if (i < 0) {
|
|
sb.append('-');
|
|
i = -i;
|
|
}
|
|
int i3 = i;
|
|
while (i3 > 0) {
|
|
i3 /= 10;
|
|
i2--;
|
|
}
|
|
for (int i4 = 0; i4 < i2; i4++) {
|
|
sb.append('0');
|
|
}
|
|
if (i != 0) {
|
|
sb.append(i);
|
|
}
|
|
}
|
|
}
|