- /**
- * @param inFirstTimestamp timestamp of first photo / audio object, or null if not available
- * @return time difference of local time zone from UTC when the first photo was taken
- */
- private static TimeDifference getTimezoneOffset(Timestamp inFirstTimestamp)
- {
- Calendar cal = null;
- // Use first timestamp if available
- if (inFirstTimestamp != null) {
- cal = inFirstTimestamp.getCalendar();
- }
- else {
- // No photo or no timestamp, just use current time
- cal = Calendar.getInstance();
- }
- // Both time zone offset and dst offset are based on milliseconds, so convert to seconds
- TimeDifference timeDiff = new TimeDifference((cal.get(Calendar.ZONE_OFFSET) + cal.get(Calendar.DST_OFFSET)) / 1000);
- return timeDiff;
- }
-
-