Package org.openstreetmap.josm.data.gpx
Class GpxTimeOffset
java.lang.Object
org.openstreetmap.josm.data.gpx.GpxTimeOffset
Time offset of GPX correlation.
- Since:
- 14205 (extracted from
CorrelateGpxWithImages)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longstatic final GpxTimeOffsetThe time offset 0. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanFormats time offset.intReturns the day difference.longGet time offset in milliseconds.longGet time offset in seconds.inthashCode()static GpxTimeOffsetmilliseconds(long milliseconds) Constructs a newGpxTimeOffsetfrom milliseconds.static GpxTimeOffsetparseOffset(String offset) Parses time offset.static GpxTimeOffsetseconds(long seconds) Constructs a newGpxTimeOffsetfrom seconds.Split out timezone and offset.Returns offset without day difference.
-
Field Details
-
ZERO
The time offset 0. -
milliseconds
-
-
Constructor Details
-
GpxTimeOffset
-
-
Method Details
-
milliseconds
Constructs a newGpxTimeOffsetfrom milliseconds.- Parameters:
milliseconds- time offset in milliseconds.- Returns:
- new
GpxTimeOffset
-
seconds
Constructs a newGpxTimeOffsetfrom seconds.- Parameters:
seconds- time offset in seconds.- Returns:
- new
GpxTimeOffset
-
getMilliseconds
Get time offset in milliseconds.- Returns:
- time offset in milliseconds
-
getSeconds
Get time offset in seconds.- Returns:
- time offset in seconds
-
formatOffset
Formats time offset.- Returns:
- formatted time offset. Format: decimal number
-
parseOffset
Parses time offset.- Parameters:
offset- time offset. Format: decimal number- Returns:
- time offset
- Throws:
ParseException- if time offset can't be parsed
-
getDayOffset
Returns the day difference.- Returns:
- the day difference
-
withoutDayOffset
Returns offset without day difference.- Returns:
- offset without day difference
-
splitOutTimezone
Split out timezone and offset.- Returns:
- pair of timezone and offset
-
equals
-
hashCode
-