Example usage for org.joda.time LocalTime get

List of usage examples for org.joda.time LocalTime get

Introduction

In this page you can find the example usage for org.joda.time LocalTime get.

Prototype

public int get(DateTimeFieldType fieldType) 

Source Link

Document

Get the value of one of the fields of time.

Usage

From source file:org.apache.flink.formats.avro.AvroRowDeserializationSchema.java

License:Apache License

private Time convertToTime(Object object) {
    final long millis;
    if (object instanceof Integer) {
        millis = (Integer) object;
    } else {//from w w  w.  j a  va2s .co m
        // use 'provided' Joda time
        final LocalTime value = (LocalTime) object;
        millis = (long) value.get(DateTimeFieldType.millisOfDay());
    }
    return new Time(millis - LOCAL_TZ.getOffset(millis));
}