From a25967a294c2ee84663106ea81606d5671a8f40f Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Thu, 16 Mar 2017 13:47:06 -0400 Subject: [PATCH 1/3] Add timezone to Timestamp metadata, comments describing the semantics Change-Id: Ia25ca11dd7f64afc8ccedb98061a0e8e5f259423 --- format/Message.fbs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/format/Message.fbs b/format/Message.fbs index fb3478de5d2..d438798d524 100644 --- a/format/Message.fbs +++ b/format/Message.fbs @@ -93,6 +93,22 @@ table Time { /// time from the Unix epoch, 00:00:00.000 on 1 January 1970, UTC. table Timestamp { unit: TimeUnit; + + /// The time zone is a string indicating the name of a time zone as used in + /// the Olson time zone database (the "tz database" or "tzdata"). + /// + /// * If the time zone is null or equal to an empty string, the data is "time + /// zone naive" and shall be displayed *as is* to the user, not localized + /// to the locale of the user's. This data can be though of as UTC but + /// without having "UTC" as the time zone, it is not considered to be + /// localized to any time zone + /// + /// * If the time zone is set to a valid value, such as "US/Eastern" or + /// "America/New_York", values can be displayed as "localized" to that time + /// zone, even though the underlying 64-bit integers are identical to the + /// same data stored in UTC. Converting between time zones is a + /// metadata-only operation and does not change the underlying values + timezone: string; } enum IntervalUnit: short { YEAR_MONTH, DAY_TIME} From 3fc10d6af7c1f4da2ed517d875f62b2ad4cc680b Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Thu, 16 Mar 2017 13:48:13 -0400 Subject: [PATCH 2/3] typo Change-Id: I5df5d7bb76707f6d75b929c94a66983371656179 --- format/Message.fbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/format/Message.fbs b/format/Message.fbs index d438798d524..fe880574c91 100644 --- a/format/Message.fbs +++ b/format/Message.fbs @@ -99,7 +99,7 @@ table Timestamp { /// /// * If the time zone is null or equal to an empty string, the data is "time /// zone naive" and shall be displayed *as is* to the user, not localized - /// to the locale of the user's. This data can be though of as UTC but + /// to the locale of the user. This data can be though of as UTC but /// without having "UTC" as the time zone, it is not considered to be /// localized to any time zone /// From e4661a491264fb4af3dd42b9729bc6cab43fc5cf Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Thu, 16 Mar 2017 16:35:33 -0400 Subject: [PATCH 3/3] Allow for absolute time zone offsets Change-Id: I0ea0e5deef284c4c0643da1c0dd14f02b71ca068 --- format/Message.fbs | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/format/Message.fbs b/format/Message.fbs index fe880574c91..f2d5eba75e6 100644 --- a/format/Message.fbs +++ b/format/Message.fbs @@ -94,8 +94,14 @@ table Time { table Timestamp { unit: TimeUnit; - /// The time zone is a string indicating the name of a time zone as used in - /// the Olson time zone database (the "tz database" or "tzdata"). + /// The time zone is a string indicating the name of a time zone, one of: + /// + /// * As used in the Olson time zone database (the "tz database" or + /// "tzdata"), such as "America/New_York" + /// * An absolute time zone offset of the form +XX:XX or -XX:XX, such as +07:30 + /// + /// Whether a timezone string is present indicates different semantics about + /// the data: /// /// * If the time zone is null or equal to an empty string, the data is "time /// zone naive" and shall be displayed *as is* to the user, not localized @@ -103,11 +109,11 @@ table Timestamp { /// without having "UTC" as the time zone, it is not considered to be /// localized to any time zone /// - /// * If the time zone is set to a valid value, such as "US/Eastern" or - /// "America/New_York", values can be displayed as "localized" to that time - /// zone, even though the underlying 64-bit integers are identical to the - /// same data stored in UTC. Converting between time zones is a - /// metadata-only operation and does not change the underlying values + /// * If the time zone is set to a valid value, values can be displayed as + /// "localized" to that time zone, even though the underlying 64-bit + /// integers are identical to the same data stored in UTC. Converting + /// between time zones is a metadata-only operation and does not change the + /// underlying values timezone: string; }