avro-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Steiblys" <lu...@doubledutch.me>
Subject Re: What is the status of Date coding?
Date Tue, 07 Jul 2015 15:00:08 GMT
Why not convert it to epoch time before serialization?

Lukas

From: Zijing Guo 
Sent: Tuesday, July 7, 2015 7:10 AM
To: Lukas Steiblys ; user@avro.apache.org 
Subject: Re: What is the status of Date coding?


      Thanks for your reply, the down side is that our data come from different timezone,
so in order to assemble the data from epoch time to a date with tz, I have to carry the tz
information within each record 





On Tuesday, July 7, 2015 9:56 AM, Lukas Steiblys <lukas@doubledutch.me> wrote:




Probably the best practice is to simply encode the number of seconds/milliseconds since 1970-01-01
UTC, also known as Unix or Epoch time, and then convert to whatever timezone you want on the
client side. This has been the only sane approach that worked for me over the years.

Lukas

From: Zijing Guo 
Sent: Tuesday, July 7, 2015 5:58 AM
To: user@avro.apache.org ; Zijing Guo 
Subject: Re: What is the status of Date coding?

I also paste this question on stackoverflow, What is the best practice of code Date field
in Apache Avro as of now?
     
           
      What is the best practice of code Date field in Apache A... 
      I have been searching around and saw the jira https://issues.apache.org/jira/browse/AVRO-739
for this matter, but I don't have a better sense of what avro support f... 
     
      View on stackoverflow.com Preview by Yahoo 
     
     






On Tuesday, July 7, 2015 8:51 AM, Zijing Guo <altergzj@yahoo.com> wrote:




I have been searching around and saw the jira https://issues.apache.org/jira/browse/AVRO-739
for this matter, but I don't have a better sense of what avro support for date time within
the user document. What I trying to achieve is to code the date with timezone information
(with iso8601) from the kafka producer side in python and all the downstream consumers are
written in java can decode it properly. what is the best practice for this?

Thanks in advance
Edwin






Mime
View raw message