Skip to content

Commit

Permalink
use FastDateFormat in TsUtils.scala (#676)
Browse files Browse the repository at this point in the history
  • Loading branch information
divyamanohar-stripe authored Feb 2, 2024
1 parent 25f5e8b commit 32ba9c3
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@

package ai.chronon.aggregator.windowing

import java.text.SimpleDateFormat
import org.apache.commons.lang3.time.FastDateFormat
import java.util.{Date, TimeZone}

object TsUtils {
val formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")
formatter.setTimeZone(TimeZone.getTimeZone("UTC"))
val formatter = FastDateFormat.getInstance("yyyy-MM-dd HH:mm:ss", TimeZone.getTimeZone("UTC"))

// in millisecond precision
def toStr(epochMillis: Long): String = {
Expand Down

0 comments on commit 32ba9c3

Please sign in to comment.