-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
10 additions
and
6 deletions.
There are no files selected for viewing
8 changes: 4 additions & 4 deletions
8
scex-util/src/main/scala/com/avsystem/scex/util/CommonDateFormat.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
package com.avsystem.scex.util | ||
|
||
import java.text.{DateFormat, SimpleDateFormat} | ||
import java.text.SimpleDateFormat | ||
|
||
object CommonDateFormat { | ||
private val dateFormatTL = new ThreadLocal[DateFormat] { | ||
override def initialValue(): DateFormat = { | ||
private val dateFormatTL = new ThreadLocal[SimpleDateFormat] { | ||
override def initialValue(): SimpleDateFormat = { | ||
val df = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss") | ||
df.setLenient(false) | ||
df | ||
} | ||
} | ||
|
||
def get: DateFormat = dateFormatTL.get | ||
def get: SimpleDateFormat = dateFormatTL.get | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters