Java Code Examples for java.time.OffsetTime#getOffset()
The following examples show how to use
java.time.OffsetTime#getOffset() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: FBTimestampTzField.java From jaybird with GNU Lesser General Public License v2.1 | 5 votes |
@Override void setOffsetTime(OffsetTime offsetTime) { // We need to base on a date to determine value, we use the current date; this will be inconsistent depending // on the date, but this aligns closest with Firebird behaviour and SQL standard ZoneOffset offset = offsetTime.getOffset(); OffsetDateTime today = OffsetDateTime.now(offset); OffsetDateTime timeToday = OffsetDateTime.of(today.toLocalDate(), offsetTime.toLocalTime(), offset); setOffsetDateTime(timeToday); }
Example 2
Source File: FBTimeTzField.java From jaybird with GNU Lesser General Public License v2.1 | 5 votes |
@Override OffsetDateTime getOffsetDateTime() throws SQLException { OffsetTime offsetTime = getOffsetTime(); if (offsetTime == null) { return null; } // We need to base on a date to determine value, we use the current date; this will be inconsistent depending // on the date, but this aligns closest with Firebird behaviour and SQL standard ZoneOffset offset = offsetTime.getOffset(); OffsetDateTime today = OffsetDateTime.now(offset); return OffsetDateTime.of(today.toLocalDate(), offsetTime.toLocalTime(), offset); }
Example 3
Source File: OffsetTimeHandle.java From alibaba-rsocket-broker with Apache License 2.0 | 4 votes |
public OffsetTimeHandle(OffsetTime o) { this.zoneOffset = o.getOffset(); this.localTime = o.toLocalTime(); }
Example 4
Source File: OffsetTimeHandle.java From joyrpc with Apache License 2.0 | 4 votes |
@Override public void wrap(final OffsetTime offsetTime) { this.zoneOffset = offsetTime.getOffset(); this.localTime = offsetTime.toLocalTime(); }
Example 5
Source File: PersistentOffsetTimeAsLongAndStringOffset.java From jadira with Apache License 2.0 | 4 votes |
@Override protected Object[] toConvertedColumns(OffsetTime value) { return new Object[] { value.toLocalTime(), value.getOffset() }; }
Example 6
Source File: PersistentOffsetTimeAsTimeAndStringOffset.java From jadira with Apache License 2.0 | 4 votes |
@Override protected Object[] toConvertedColumns(OffsetTime value) { return new Object[] { value.toLocalTime(), value.getOffset() }; }
Example 7
Source File: PersistentOffsetTimeAsStringAndStringOffset.java From jadira with Apache License 2.0 | 4 votes |
@Override protected Object[] toConvertedColumns(OffsetTime value) { return new Object[] { value.toLocalTime(), value.getOffset() }; }