Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C43411737B for ; Fri, 31 Oct 2014 12:27:14 +0000 (UTC) Received: (qmail 83816 invoked by uid 500); 31 Oct 2014 12:27:12 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 83742 invoked by uid 500); 31 Oct 2014 12:27:12 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 83732 invoked by uid 99); 31 Oct 2014 12:27:11 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2014 12:27:11 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nitinpawar432@gmail.com designates 209.85.160.170 as permitted sender) Received: from [209.85.160.170] (HELO mail-yk0-f170.google.com) (209.85.160.170) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Oct 2014 12:27:07 +0000 Received: by mail-yk0-f170.google.com with SMTP id 19so3251711ykq.1 for ; Fri, 31 Oct 2014 05:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=2iRPLj7m3QprMckPMW5tVVzPcNhkER/0H0IrDVSkx5w=; b=ELhmEZFvYxhqQr2BoVP8vROqOxgGorCW92HBQ7ZFmEvvN7rP5ptttM8o/IKJr2Xo7g 83e4r3ZUkcZtyuzSzA662Wcu3Mo14WmWc2RN+0Ny3hD7fXiwH4Z6JdYTMaGjraOZov9/ VW9DopwVUyCBJ/5EoNNDB2x942tfdnEiStLA2i+DFl1dAERKPTokGdkh7rQwJ/i/wIbO UM8fvGBpHNXivv8RmNaxiG9dZYsXx97cCjYPFRTAih3NZm8lw7V4UDkAOXkCEIqDVIC2 gq+tbd0iOE8BJ7AO38cwtb0YN3BFO6Yh3PX/FR3Ab7Dq9GI+TVO/o9TRaAi8Dmvht/of Rc2g== MIME-Version: 1.0 X-Received: by 10.236.70.229 with SMTP id p65mr12791523yhd.86.1414758361617; Fri, 31 Oct 2014 05:26:01 -0700 (PDT) Received: by 10.170.61.22 with HTTP; Fri, 31 Oct 2014 05:26:01 -0700 (PDT) In-Reply-To: References: Date: Fri, 31 Oct 2014 17:56:01 +0530 Message-ID: Subject: Re: from_unixtime() and epoch definition From: Nitin Pawar To: "user@hive.apache.org" Content-Type: multipart/alternative; boundary=001a11c1c636965a880506b7195f X-Virus-Checked: Checked by ClamAV on apache.org --001a11c1c636965a880506b7195f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable In hive from_unixtime is returned from the timezone which you belong to "From document : from_unixtime(bigint unixtime[, string format]) : Converts the number of seconds from unix epoch (1970-01-01 00:00:00 UTC) to a string representing the timestamp of that moment in the current system time zone in the format of "1970-01-01 00:00:00". if possible can you also check by changing the timezone to UTC on your machine? On Fri, Oct 31, 2014 at 5:32 PM, Maciek wrote: > meant 1970-01-01 00:00:00 of course=E2=80=A6 > > On Fri, Oct 31, 2014 at 12:00 PM, Maciek wrote: > >> Any reason why >> >> select from_unixtime(0) t0 FROM =E2=80=A6 >> >> gives >> >> 1970-01-01 01:00:00 >> >> ? >> >> By all available definitions (epoch, from_unixtime etc..) I would expect >> it to be 1970-01-01 00:00:00=E2=80=A6? >> > > > > -- > Kind Regards > Maciek Kocon > > --=20 Nitin Pawar --001a11c1c636965a880506b7195f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
In hive from_unixtime is returned from the timezone which = you belong to
"From document :=C2=A0from_unixtime(bigint unixtime[= , string format]) : Converts the number of seconds from unix epoch (1970-01= -01 00:00:00 UTC) to a string representing the timestamp of that moment in = the current system time zone in the format of "1970-01-01 00:00:00&quo= t;.=C2=A0

if possible can you also check by changi= ng the timezone to UTC on your machine?

On Fri, Oct 31, 2014 at 5:32 PM, Maciek <= span dir=3D"ltr"><m= aciek@sonra.io> wrote:
meant=C2=A01970-01-01 00:00:00=C2=A0of course=E2=80=A6

On Fri, Oct 3= 1, 2014 at 12:00 PM, Maciek <maciek@sonra.io> wrote:
=

Any reason why

<= span style=3D"font-size:16px;font-family:Inconsolata;color:rgb(0,0,0);verti= cal-align:baseline;white-space:pre-wrap;background-color:rgb(239,239,239)">= select from_unixtime(0) t0 FROM =E2=80=A6

gives

1970-01-01 01:00:00=

?=


By all available definitions (epoch, from_unixti= me etc..) I would expect it to be 1970-01-01 00:00:00= =E2=80=A6?



--
Kind= Regards
Maciek Kocon




--
Nitin Pawar
--001a11c1c636965a880506b7195f--