X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fdata%2FTimestampLocal.java;fp=tim%2Fprune%2Fdata%2FTimestampLocal.java;h=30f886173dc9844b1c45093ce5357a297cd8580d;hp=d4c909328262d526a9c499aa4f7723175d4b00e4;hb=2d8cb72e84d5cc1089ce77baf1e34ea3ea2f8465;hpb=1a735a99408fd3b0c5ac4fe7b2fdbdbb23d38f40 diff --git a/tim/prune/data/TimestampLocal.java b/tim/prune/data/TimestampLocal.java index d4c9093..30f8861 100644 --- a/tim/prune/data/TimestampLocal.java +++ b/tim/prune/data/TimestampLocal.java @@ -91,14 +91,17 @@ public class TimestampLocal extends Timestamp /** * Utility method for formatting dates / times * @param inFormat formatter object - * @param inTimezone timezone to use + * @param inTimezone timezone to use, or null * @return formatted String */ @Override protected String format(DateFormat inFormat, TimeZone inTimezone) { Calendar cal = getCalendar(inTimezone); - inFormat.setTimeZone(inTimezone); + if (inTimezone != null) + { + inFormat.setTimeZone(inTimezone); + } return inFormat.format(cal.getTime()); } }