mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-02 05:41:33 +02:00
Change timestamp parsing to include milliseconds.
This commit is contained in:
@@ -85,7 +85,7 @@ public class SnapshotGetDocResult extends Result {
|
||||
email = userObject.get("email").getAsString();
|
||||
} else {
|
||||
name = "Anonymous";
|
||||
email = "anonymous@writelatex.com";
|
||||
email = "anonymous@overleaf.com";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,12 +33,12 @@ public class Snapshot implements Comparable<Snapshot> {
|
||||
userEmail = user.getEmail();
|
||||
TimeZone tz = TimeZone.getDefault();
|
||||
Calendar cal = Calendar.getInstance(tz);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
|
||||
sdf.setCalendar(cal);
|
||||
try {
|
||||
cal.setTime(sdf.parse(info.getCreatedAt()));
|
||||
} catch (ParseException e) {
|
||||
throw new RuntimeException(e);
|
||||
} catch (ParseException e2) {
|
||||
throw new RuntimeException(e2);
|
||||
}
|
||||
createdAt = cal.getTime();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user