|
|
@ -251,7 +251,7 @@ public class PersonIdent { |
|
|
|
* @return this person's declared time zone; null if time zone is unknown. |
|
|
|
* @return this person's declared time zone; null if time zone is unknown. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public TimeZone getTimeZone() { |
|
|
|
public TimeZone getTimeZone() { |
|
|
|
StringBuffer tzId = new StringBuffer(8); |
|
|
|
StringBuilder tzId = new StringBuilder(8); |
|
|
|
tzId.append("GMT"); |
|
|
|
tzId.append("GMT"); |
|
|
|
appendTimezone(tzId); |
|
|
|
appendTimezone(tzId); |
|
|
|
return TimeZone.getTimeZone(tzId.toString()); |
|
|
|
return TimeZone.getTimeZone(tzId.toString()); |
|
|
@ -285,7 +285,7 @@ public class PersonIdent { |
|
|
|
* @return a string in the git author format |
|
|
|
* @return a string in the git author format |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public String toExternalString() { |
|
|
|
public String toExternalString() { |
|
|
|
final StringBuffer r = new StringBuffer(); |
|
|
|
final StringBuilder r = new StringBuilder(); |
|
|
|
r.append(getName()); |
|
|
|
r.append(getName()); |
|
|
|
r.append(" <"); |
|
|
|
r.append(" <"); |
|
|
|
r.append(getEmailAddress()); |
|
|
|
r.append(getEmailAddress()); |
|
|
@ -296,7 +296,7 @@ public class PersonIdent { |
|
|
|
return r.toString(); |
|
|
|
return r.toString(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void appendTimezone(final StringBuffer r) { |
|
|
|
private void appendTimezone(final StringBuilder r) { |
|
|
|
int offset = tzOffset; |
|
|
|
int offset = tzOffset; |
|
|
|
final char sign; |
|
|
|
final char sign; |
|
|
|
final int offsetHours; |
|
|
|
final int offsetHours; |
|
|
@ -324,7 +324,7 @@ public class PersonIdent { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String toString() { |
|
|
|
public String toString() { |
|
|
|
final StringBuffer r = new StringBuffer(); |
|
|
|
final StringBuilder r = new StringBuilder(); |
|
|
|
final SimpleDateFormat dtfmt; |
|
|
|
final SimpleDateFormat dtfmt; |
|
|
|
dtfmt = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy Z", Locale.US); |
|
|
|
dtfmt = new SimpleDateFormat("EEE MMM d HH:mm:ss yyyy Z", Locale.US); |
|
|
|
dtfmt.setTimeZone(getTimeZone()); |
|
|
|
dtfmt.setTimeZone(getTimeZone()); |
|
|
|