進口sqlContext.implicits._
進口org.apache.spark.sql.functions._
inputDF.select (
unix_timestamp ($ unix_timestamp) .alias (“unix_timestamp”),
from_utc_timestamp ($“unix_timestamp .cast (DataTypes.TimestampType), UTC) .alias (UTC),
from_utc_timestamp ($“unix_timestamp .cast (DataTypes.TimestampType)、“美國/ Los_Angeles”) .alias (“pst_timestamp”)
)