fix: use utc timestamp in db
This commit is contained in:
@@ -10,8 +10,7 @@ import android.util.Log
|
|||||||
import com.google.gson.Gson
|
import com.google.gson.Gson
|
||||||
import com.google.gson.JsonSyntaxException
|
import com.google.gson.JsonSyntaxException
|
||||||
import com.google.gson.reflect.TypeToken
|
import com.google.gson.reflect.TypeToken
|
||||||
import java.time.LocalDateTime
|
import java.time.Instant
|
||||||
import java.time.format.DateTimeFormatter
|
|
||||||
|
|
||||||
|
|
||||||
object LoggerContract {
|
object LoggerContract {
|
||||||
@@ -66,9 +65,7 @@ object LoggerContract {
|
|||||||
fun writeLog(payload: Any): Long? {
|
fun writeLog(payload: Any): Long? {
|
||||||
val gson = Gson()
|
val gson = Gson()
|
||||||
val jsonString = gson.toJson(payload)
|
val jsonString = gson.toJson(payload)
|
||||||
|
val ts = Instant.now().toString()
|
||||||
val date = LocalDateTime.now()
|
|
||||||
val ts = date.format(DateTimeFormatter.ISO_DATE_TIME)
|
|
||||||
|
|
||||||
Log.i("Database", jsonString)
|
Log.i("Database", jsonString)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user