Skip to content
This repository was archived by the owner on May 26, 2026. It is now read-only.

Commit a9ecfe7

Browse files
committed
Don't lose milliseconds in toTimestamp util
1 parent 66283a8 commit a9ecfe7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/src/main/kotlin/at/bitfire/synctools/util/AndroidTimeUtils.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ object AndroidTimeUtils {
7777
* Same as [toInstant], but returns a UNIX timestamp (in milliseconds) instead of an [Instant].
7878
*/
7979
fun Temporal.toTimestamp(): Long =
80-
toInstant().epochSecond * 1000
80+
toInstant().toEpochMilli()
8181

8282
/**
8383
* Converts this [Temporal] to a [ZonedDateTime] that is created from the timestamp returned by

0 commit comments

Comments
 (0)