X-Git-Url: http://gitweb.fperrin.net/?p=GpsPrune.git;a=blobdiff_plain;f=tim%2Fprune%2Fconfig%2FTimezoneHelper.java;fp=tim%2Fprune%2Fconfig%2FTimezoneHelper.java;h=f3871d492bbad43f3b9de2dc8ca5a4790438aac6;hp=0000000000000000000000000000000000000000;hb=92dad5df664287acb51728e9ea599f150765d34a;hpb=81843c3d8d0771bf00d0f26034a13aa515465c78 diff --git a/tim/prune/config/TimezoneHelper.java b/tim/prune/config/TimezoneHelper.java new file mode 100644 index 0000000..f3871d4 --- /dev/null +++ b/tim/prune/config/TimezoneHelper.java @@ -0,0 +1,22 @@ +package tim.prune.config; + +import java.util.TimeZone; + +public abstract class TimezoneHelper +{ + + /** + * @return the timezone selected in the Config + */ + public static TimeZone getSelectedTimezone() + { + final String zoneId = Config.getConfigString(Config.KEY_TIMEZONE_ID); + if (zoneId == null || zoneId.equals("")) { + return TimeZone.getDefault(); + } + else { + return TimeZone.getTimeZone(zoneId); + } + } + +}