Constructor and Description |
---|
DateTimeCodec() |
Modifier and Type | Method and Description |
---|---|
static ExtendedDateTime |
createExtendedDateTime(org.joda.time.DateTimeZone tz,
int year,
int month,
int day,
int hour,
int minute,
int second,
int microsec) |
static ExtendedDateTime |
fromPackedLong(long packed,
org.joda.time.DateTimeZone tz)
Read datetime from packed Long which contains all parts of a datetime namely, year, month,
day and hour, min and sec, millisec.
|
static ExtendedDateTime |
readFromUInt(CodecDataInput cdi,
org.joda.time.DateTimeZone tz)
Read datetime from packed Long as unsigned fixed-len integer
|
static ExtendedDateTime |
readFromUVarInt(CodecDataInput cdi,
org.joda.time.DateTimeZone tz)
Read datetime from packed Long encoded as unsigned var-len integer converting into specified
timezone
|
static long |
toPackedLong(ExtendedDateTime extendedDateTime,
org.joda.time.DateTimeZone tz)
Encode a DateTime to a packed long converting to specific timezone
|
static void |
writeDateTimeFully(CodecDataOutput cdo,
ExtendedDateTime extendeddateTime,
org.joda.time.DateTimeZone tz)
Encode DateTime as packed long converting into specified timezone All timezone conversion
should be done beforehand
|
static void |
writeDateTimeProto(CodecDataOutput cdo,
ExtendedDateTime extendedDateTime,
org.joda.time.DateTimeZone tz)
Encode DateTime as packed long converting into specified timezone All timezone conversion
should be done beforehand The encoded value has no data type flag
|
public static long toPackedLong(ExtendedDateTime extendedDateTime, org.joda.time.DateTimeZone tz)
extendedDateTime
- dateTime with nanos that need to be encoded.tz
- timezone used for converting to localDateTimepublic static ExtendedDateTime fromPackedLong(long packed, org.joda.time.DateTimeZone tz)
packed
- long value that packs date / time partstz
- timezone to interpret datetime partspublic static ExtendedDateTime createExtendedDateTime(org.joda.time.DateTimeZone tz, int year, int month, int day, int hour, int minute, int second, int microsec)
public static void writeDateTimeFully(CodecDataOutput cdo, ExtendedDateTime extendeddateTime, org.joda.time.DateTimeZone tz)
cdo
- encoding outputextendeddateTime
- value to encodetz
- timezone used to converting local timepublic static void writeDateTimeProto(CodecDataOutput cdo, ExtendedDateTime extendedDateTime, org.joda.time.DateTimeZone tz)
cdo
- encoding outputextendedDateTime
- value to encodetz
- timezone used to converting local timepublic static ExtendedDateTime readFromUVarInt(CodecDataInput cdi, org.joda.time.DateTimeZone tz)
cdi
- codec buffer inputtz
- timezone to interpret datetime partsfromPackedLong(long, DateTimeZone)
public static ExtendedDateTime readFromUInt(CodecDataInput cdi, org.joda.time.DateTimeZone tz)
cdi
- codec buffer inputtz
- timezone to interpret datetime partsfromPackedLong(long, DateTimeZone)
Copyright © 2024 PingCAP. All rights reserved.