@Jason:
re. Hive (…) just assumes things are in the system's local timezone, just
to clarify - this is not true in case of conversions (from_unixtime()) as
it respects the local system TZ settings hence the problem.
TZ itself is a very hairy subject and would definitely be a big
undertaking.
Hi Maciek, Jason
Sorry I could not find my old code but I came up with a little code as much
as I can remember.
you can try the following jar
https://github.com/nitinpawar/hive-udfs/tree/master/FromUnixtimeWithTZ/dist
and let me know if this works for you guys.
I can change it the way it needs
I see… and confirm, it's consistent with Linux/Unix output I get:
date -r 0
Thu 1 Jan 1970 01:00:00 IST
date
Wed 5 Nov 2014 14:49:52 GMT
Got some digging and it actually makes sense. Turns out Ireland didn't
observe daylight saving time in years 1968-1972 as set permanently to
GMT+1=IST.
Hive should probably at least provide a timezone option to from_unixtime().
As you mentioned, Hive doesn't really do any timezone handling, just assumes
things are in the system's local timezone. It will be a bit of a bigger project
to add better time zone handling to Hive timestamps.
On Nov
May be a JIRA ?
I remember having my own UDF for doing this. If possible I will share the
code
On Thu, Nov 6, 2014 at 6:22 AM, Jason Dere jd...@hortonworks.com wrote:
Hive should probably at least provide a timezone option to
from_unixtime().
As you mentioned, Hive doesn't really do any
That would be great!
On Nov 5, 2014, at 10:49 PM, Nitin Pawar nitinpawar...@gmail.com wrote:
May be a JIRA ?
I remember having my own UDF for doing this. If possible I will share the
code
On Thu, Nov 6, 2014 at 6:22 AM, Jason Dere jd...@hortonworks.com wrote:
Hive should probably at
I'd consider this behaviour as a bug and would like to raise it as such.
Is there anyone to confirm it's the same on Hive 0.14?
On Fri, Oct 31, 2014 at 3:41 PM, Maciek mac...@sonra.io wrote:
Actually confirmed! It's down to the timezone settings
I've moved temporarily server/client settings to
As Nitin mentions, the behavior is to a string representing the timestamp of
that moment in the current system time zone. What are the timezone settings
on your machine?
$ TZ=GMT date -r 0
Thu Jan 1 00:00:00 GMT 1970
$ TZ=UTC date -r 0
Thu Jan 1 00:00:00 UTC 1970
$ TZ=Europe/London date
Any reason why
select from_unixtime(0) t0 FROM …
gives
1970-01-01 01:00:00
?
By all available definitions (epoch, from_unixtime etc..) I would expect it
to be 1970-01-01 01:00:00…?
Do you have a copy paste error?
I see both values as same
On Fri, Oct 31, 2014 at 5:30 PM, Maciek mac...@sonra.io wrote:
Any reason why
select from_unixtime(0) t0 FROM …
gives
1970-01-01 01:00:00
?
By all available definitions (epoch, from_unixtime etc..) I would expect
it to be
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
Actually confirmed! It's down to the timezone settings
I've moved temporarily server/client settings to 'Atlantic/Reykjavik' (no
change in time comparing to what I was on (GMT), but it's permanent UTC and
as such doesn't observe daylight saving.
I believe this shouldn't matter (see my points from
12 matches
Mail list logo