impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthew Jacobs (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-3504: function for current timestamp in UTC, i.e. utc timestamp()
Date Thu, 22 Sep 2016 22:53:35 GMT
Matthew Jacobs has posted comments on this change.

Change subject: IMPALA-3504: function for current timestamp in UTC, i.e. utc_timestamp()

Patch Set 3:

(1 comment)
File be/src/service/

PS3, Line 842:   typedef boost::date_time::c_local_adjustor<ptime> local_adj;
             :   const ptime& utime = boost::posix_time::microsec_clock::universal_time();
             :   const ptime& ltime = local_adj::utc_to_local(utime);
             :   query_ctx->__set_now_string(TimestampValue(ltime).DebugString());
             :   query_ctx->__set_now_utc_string(TimestampValue(utime).DebugString());
> As a user, I would be surprised if now() and utc_timestamp() were off by 8 
I don't think it matters since (AFAIK) the functions don't both promise to be at some specific
point in time. Some docs say "the current date and time", whatever that means. If it were
free and they were exactly the same, that'd be great, but I'd vote for less complexity. Are
we even confident the conversion will result in it being the exact X hrs offset anyway? I
don't trust any functions related to timestamps/timezones, etc., so IMO less touching/converting
is more :)

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I5ee6ee192aa469f77c711f27ad324696a42004d1
Gerrit-PatchSet: 3
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Youwei Wang <>
Gerrit-Reviewer: Jim Apple <>
Gerrit-Reviewer: Matthew Jacobs <>
Gerrit-Reviewer: Youwei Wang <>
Gerrit-HasComments: Yes

View raw message