Esri / spatial-framework-for-hadoop

The Spatial Framework for Hadoop allows developers and data scientists to use the Hadoop data processing system for spatial data analysis.
Apache License 2.0
363 stars 160 forks source link

Fix daylight shift test #144

Closed saifalharthi closed 6 years ago

saifalharthi commented 6 years ago

This PR contains a simple fix for the failing test in this issue #141

randallwhitman commented 6 years ago

Would it be simpler to choose a time near noon instead of a time near midnight? Versus, would choosing a different rather-random epoch number, merely change which timezone suffers the test failure? @saifalharthi

saifalharthi commented 6 years ago

The problem was daily light shifting. It would've been easier to select another random epoch number but we'll still have some problems with respect to other timezones. So, I forced the return date to be converted and formatted to a timezone that has daylight savings and that should work with any epoch number given. @randallwhitman

randallwhitman commented 6 years ago

So in other words, no what epoch-number we choose, it will be too close to midnight in some time zone. Thanks Saif.

randallwhitman commented 6 years ago

Saif - I reviewed TestGeoJsonSerDe looking if it would likely need the same change. It looks like the timezone was addressed in a different manner in that one. Do you think either way is any better or worse than the other?

saifalharthi commented 6 years ago

I will take a look at it

saifalharthi commented 6 years ago

I think the approach in TestGeoJsonSerDe should work out fine. I think since it deals with a default timezone offset it will guarantee a more stable time conversion.

randallwhitman commented 6 years ago

OK, sounds good.

randallwhitman commented 6 years ago

Well, if it works, we can merge now and later think about consistency of timezone handling in that test for EsriJson & GeoJson.