@@ -789,15 +789,15 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
789789 checkEvaluation(
790790 UnixTimestamp (Literal (date1), Literal (" yyyy-MM-dd HH:mm:ss" ), timeZoneId),
791791 MILLISECONDS .toSeconds(
792- DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz)))
792+ DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz.toZoneId )))
793793 checkEvaluation(
794794 UnixTimestamp (Literal (sdf2.format(new Timestamp (- 1000000 ))),
795795 Literal (fmt2), timeZoneId),
796796 - 1000L )
797797 checkEvaluation(UnixTimestamp (
798798 Literal (sdf3.format(Date .valueOf(" 2015-07-24" ))), Literal (fmt3), timeZoneId),
799799 MILLISECONDS .toSeconds(DateTimeUtils .daysToMillis(
800- DateTimeUtils .fromJavaDate(Date .valueOf(" 2015-07-24" )), tz)))
800+ DateTimeUtils .fromJavaDate(Date .valueOf(" 2015-07-24" )), tz.toZoneId )))
801801 val t1 = UnixTimestamp (
802802 CurrentTimestamp (), Literal (" yyyy-MM-dd HH:mm:ss" )).eval().asInstanceOf [Long ]
803803 val t2 = UnixTimestamp (
@@ -815,7 +815,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
815815 checkEvaluation(
816816 UnixTimestamp (Literal (date1), Literal .create(null , StringType ), timeZoneId),
817817 MILLISECONDS .toSeconds(
818- DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz)))
818+ DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz.toZoneId )))
819819 checkEvaluation(
820820 UnixTimestamp (Literal (" 2015-07-24" ), Literal (" not a valid format" ), timeZoneId), null )
821821 }
@@ -853,7 +853,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
853853 checkEvaluation(
854854 ToUnixTimestamp (Literal (date1), Literal (fmt1), timeZoneId),
855855 MILLISECONDS .toSeconds(
856- DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz)))
856+ DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz.toZoneId )))
857857 checkEvaluation(
858858 ToUnixTimestamp (
859859 Literal (sdf2.format(new Timestamp (- 1000000 ))),
@@ -862,7 +862,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
862862 checkEvaluation(ToUnixTimestamp (
863863 Literal (sdf3.format(Date .valueOf(" 2015-07-24" ))), Literal (fmt3), timeZoneId),
864864 MILLISECONDS .toSeconds(DateTimeUtils .daysToMillis(
865- DateTimeUtils .fromJavaDate(Date .valueOf(" 2015-07-24" )), tz)))
865+ DateTimeUtils .fromJavaDate(Date .valueOf(" 2015-07-24" )), tz.toZoneId )))
866866 val t1 = ToUnixTimestamp (
867867 CurrentTimestamp (), Literal (fmt1)).eval().asInstanceOf [Long ]
868868 val t2 = ToUnixTimestamp (
@@ -877,7 +877,7 @@ class DateExpressionsSuite extends SparkFunSuite with ExpressionEvalHelper {
877877 checkEvaluation(ToUnixTimestamp (
878878 Literal (date1), Literal .create(null , StringType ), timeZoneId),
879879 MILLISECONDS .toSeconds(
880- DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz)))
880+ DateTimeUtils .daysToMillis(DateTimeUtils .fromJavaDate(date1), tz.toZoneId )))
881881 checkEvaluation(
882882 ToUnixTimestamp (
883883 Literal (" 2015-07-24" ),
0 commit comments