com.mysql.cj.protocol

## Class InternalTimestamp

- java.lang.Object
- - com.mysql.cj.protocol.InternalDate
  - - com.mysql.cj.protocol.InternalTimestamp

    public class InternalTimestamp
    extends InternalDate

### Field Summary

Fields
`private int` `hours`
`private int` `minutes`
`private int` `nanos`
`private int` `offset`
`private int` `scale`
`private int` `seconds`

### Fields inherited from class com.mysql.cj.protocol.InternalDate

`day, month, year`

### Constructor Summary

Constructors
Constructor and Description
`InternalTimestamp()` Constructs a zero datetime
`InternalTimestamp(int year, int month, int day, int hours, int minutes, int seconds, int nanos, int scale)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`static InternalTimestamp` `from(Calendar x, int nanos)`
`static InternalTimestamp` `from(LocalDate x)`
`static InternalTimestamp` `from(LocalDateTime x)`
`static InternalTimestamp` `from(OffsetDateTime x)`
`static InternalTimestamp` `from(ZonedDateTime x)`
`int` `getHours()`
`int` `getMinutes()`
`int` `getNanos()`
`int` `getOffset()`
`int` `getScale()`
`int` `getSeconds()`
`boolean` `isZero()`
`void` `setHours(int hours)`
`void` `setMinutes(int minutes)`
`void` `setNanos(int nanos)`
`void` `setOffset(int offset)`
`void` `setScale(int scale)`
`void` `setSeconds(int seconds)`

### Methods inherited from class com.mysql.cj.protocol.InternalDate

`from, getDay, getMonth, getYear, setDay, setMonth, setYear`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### hours

    private int hours

#### minutes

    private int minutes

#### seconds

    private int seconds

#### nanos

    private int nanos

#### scale

    private int scale

#### offset

    private int offset

### Constructor Detail

#### InternalTimestamp

    public InternalTimestamp()

Constructs a zero datetime

#### InternalTimestamp

    public InternalTimestamp(int year,
                             int month,
                             int day,
                             int hours,
                             int minutes,
                             int seconds,
                             int nanos,
                             int scale)

### Method Detail

#### from

    public static InternalTimestamp from(LocalDate x)

#### from

    public static InternalTimestamp from(LocalDateTime x)

#### from

    public static InternalTimestamp from(OffsetDateTime x)

#### from

    public static InternalTimestamp from(ZonedDateTime x)

#### from

    public static InternalTimestamp from(Calendar x,
                                         int nanos)

#### getHours

    public int getHours()

#### setHours

    public void setHours(int hours)

#### getMinutes

    public int getMinutes()

#### setMinutes

    public void setMinutes(int minutes)

#### getSeconds

    public int getSeconds()

#### setSeconds

    public void setSeconds(int seconds)

#### getNanos

    public int getNanos()

#### setNanos

    public void setNanos(int nanos)

#### getScale

    public int getScale()

#### setScale

    public void setScale(int scale)

#### getOffset

    public int getOffset()

#### setOffset

    public void setOffset(int offset)

#### isZero

    public boolean isZero()

Overrides:
  `isZero` in class `InternalDate`

Copyright © 2016, 2024, Oracle and/or its affiliates.