diff --git a/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/datetimeExpressions.scala b/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/datetimeExpressions.scala index 3a338c91a09..09d4a977084 100644 --- a/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/datetimeExpressions.scala +++ b/sql-plugin/src/main/scala/org/apache/spark/sql/rapids/datetimeExpressions.scala @@ -856,7 +856,7 @@ abstract class GpuToTimestamp val tmp = lhs.dataType match { case _: StringType => // rhs is ignored we already parsed the format - if (getTimeParserPolicy == LegacyTimeParserPolicy) { + val res = if (getTimeParserPolicy == LegacyTimeParserPolicy) { parseStringAsTimestampWithLegacyParserPolicy( lhs, sparkFormat, @@ -871,6 +871,11 @@ abstract class GpuToTimestamp DType.TIMESTAMP_MICROSECONDS, failOnError) } + if (GpuOverrides.isUTCTimezone(zoneId)) { + res + } else { + GpuTimeZoneDB.fromTimestampToUtcTimestamp(res, zoneId) + } case _: DateType => timeZoneId match { case Some(_) =>