Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time shift occurring between spark and h2o frame #3591

Closed
exalate-issue-sync bot opened this issue May 22, 2023 · 2 comments
Closed

Time shift occurring between spark and h2o frame #3591

exalate-issue-sync bot opened this issue May 22, 2023 · 2 comments
Assignees

Comments

@exalate-issue-sync
Copy link

Customer reported that h2o is adding a timeshift (+7 hours, likely from timezone) while pandas dataframe does not.

{code:python}h2o.cluster().timezone{code}

{{'UTC'}}

{code:python}df = spark.read.parquet('hdfs://' + input_path + '/' + input_data)[keep_list]
df1 = df.limit(10).select('snapshot_date')
df1.cache()
df1.show(){code}

{quote}+-------------+

|snapshot_date|

+-------------+

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

| 2015-01-01|

+-------------+{quote}

{code:python}#h2o.cluster().timezone = "America/Phoenix"
hc.as_h2o_frame(df1)

#Method 'as_h2o_frame' is deprecated and will be removed in release 3.30. Please use method 'asH2OFrame' instead!{code}

||snapshot_date||
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|
|2015-01-01 07:00:00|

{noformat}df1.schema
StructType(List(StructField(snapshot_date,DateType,true)))
h2o.H2OFrame(df1.toPandas())
Parse progress: |█████████████████████████████████████████████████████████| 100%{noformat}

||snapshot_date||
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|
|2015-01-01 00:00:00|

@DinukaH2O
Copy link

JIRA Issue Migration Info

Jira Issue: SW-2070
Assignee: Marek Novotny
Reporter: Neema Mashayekhi
State: Resolved
Fix Version: 3.28.1.2-1
Attachments: N/A
Development PRs: N/A

@hasithjp
Copy link
Member

JIRA Issue Migration Info Cont'd

Jira Issue Created Date: 2020-03-10T15:32:23.593-0700

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants