Github user zsxwing commented on a diff in the pull request: https://github.com/apache/spark/pull/16166#discussion_r91147605 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/ProgressReporter.scala --- @@ -78,6 +79,8 @@ trait ProgressReporter extends Logging { // The timestamp we report an event that has no input data private var lastNoDataProgressEventTime = Long.MinValue + private val timestampFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") // ISO8601 --- End diff -- You need to set the timezone before using this format. Otherwise, the time is based on your timezone. E.g., ``` scala> new java.util.Date() res7: java.util.Date = Tue Dec 06 10:48:00 PST 2016 scala> val timestampFormat = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") timestampFormat: java.text.SimpleDateFormat = java.text.SimpleDateFormat@5af7aed5 scala> timestampFormat.format(new java.util.Date()) res8: String = 2016-12-06T10:48:09.342Z scala> val timestampFormat = new java.text.SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'") timestampFormat: java.text.SimpleDateFormat = java.text.SimpleDateFormat@5af7aed5 scala> timestampFormat.setTimeZone(java.util.TimeZone.getTimeZone("UTC")) scala> timestampFormat.format(new java.util.Date()) res10: String = 2016-12-06T18:48:20.048Z ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org