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: [email protected] ; 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 <[email protected]> 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


Reply via email to