I agree. Otherwise everyone using Thrift who needs to pass date/time has to roll their own parser. Often that means making it language or platform specific.
How about this: Thrift could represent the date/time internally as a 64-bit type to reduce storage and network bandwidth. There could be accessors that print it out as a string and parse incoming date/time strings, converting it to the internal 64-bit type. Perhaps use Boost as a template for the string formatting? (not necessarily use Boost directly, though that's an option) ________________________________ From: Andrew Pennebaker <[email protected]> To: Thrift Users <[email protected]> Sent: Friday, August 23, 2013 8:06 AM Subject: Re: 回复:AW: Datetime data type in Thrift? ... which is why Thrift needs a datetime data type. On Fri, Aug 23, 2013 at 2:56 AM, Jens Geyer <[email protected]> wrote: > String may involve conversion and parsing. > ________________________________ > Von: nosql-菜鸟 > Gesendet: 23.08.2013 08:31 > An: user; user > Betreff: 回复:AW: Datetime data type in Thrift? > > you can use string or i32. string is better. > > > > > ------------------ 原始邮件 ------------------ > 发件人: "Jens Geyer"; > 发送时间: 2013年8月23日(星期五) 凌晨1:59 > 收件人: "user"; > 主题: AW: Datetime data type in Thrift? > > > > No, the recommendation is to use double or i64. The biggest challenge is > to find consensus on the timestamp base. Especially across platforms. > > Btw, all available data types can be found on the website at > thrift.apache.org > > Protobuf: dont know. > ________________________________ > Von: Andrew Pennebaker > Gesendet: 22.08.2013 18:51 > An: Thrift Users > Betreff: Datetime data type in Thrift? > > Could there be a Thrift data type for datetimes? Integrating different > datetime formats across systems can be really helpful. > > If not, do Protocol Buffers have a datetime data type? >
