secor icon indicating copy to clipboard operation
secor copied to clipboard

Cannot parse timestamp with timezone

Open jvaesteves opened this issue 4 years ago • 1 comments

Hi I am trying to use a timestamp column as the partition column, but when I try to parse it, I only receive dt=1970-01-01 as the result.

The value of the column is 2020-12-08T15:11:55.019-0300

And I tried the following:

  • Using DateMessageParser as parser.class, with input.pattern "yyyy-MM-dd'T'HH:mm:ss.SSSX" and "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
  • Using Iso8601MessageParser as parser.class
  • Using JsonMessageParser as parser.class (this one raised an Exception instead)

jvaesteves avatar Dec 30 '20 13:12 jvaesteves

I think it would be easier if you add a few print statement in DateMessageParser class to see what was going on.

On Wed, Dec 30, 2020 at 5:47 AM João Esteves [email protected] wrote:

Hi I am trying to use a timestamp column as the partition column, but when I try to parse it, I only receive dt=1970-01-01 as the result.

The value of the column is 2020-12-08T15:11:55.019-0300

And I tried the following:

  • Using DateMessageParser as parser.class, with input.pattern "yyyy-MM-dd'T'HH:mm:ss.SSSX" and "yyyy-MM-dd'T'HH:mm:ss.SSSZ"
  • Using Iso8601MessageParser as parser.class
  • Using JsonMessageParser as parser.class (this one raised an Exception instead)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/pinterest/secor/issues/1787, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABYJP7YZ4JC3FP7Z6WDR5ZTSXMVO5ANCNFSM4VOK7EFA .

HenryCaiHaiying avatar Dec 30 '20 19:12 HenryCaiHaiying