From 6828e05e8e2325c282c624aa7c63033b6ffc0bdd Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Thu, 16 Mar 2017 15:04:36 -0400 Subject: [PATCH] Format changes for Date per discussion in ARROW-316 --- format/Message.fbs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/format/Message.fbs b/format/Message.fbs index 8fdcc804d470..62545ef76ba6 100644 --- a/format/Message.fbs +++ b/format/Message.fbs @@ -81,8 +81,19 @@ table Decimal { scale: int; } -/// Date is a 64-bit type representing milliseconds since the UNIX epoch +enum DateUnit: short { + DAY, + MILLISECOND +} + +/// Date is either a 32-bit or 64-bit type representing elapsed time since UNIX +/// epoch (1970-01-01), stored in either of two units: +/// +/// * Milliseconds (64 bits) indicating UNIX time elapsed since the epoch (no +/// leap seconds), where the values are evenly divisible by 86400000 +/// * Days (32 bits) since the UNIX epoch table Date { + unit: DateUnit; } enum TimeUnit: short { SECOND, MILLISECOND, MICROSECOND, NANOSECOND }