-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed method name for LocalDateTime converting (#1627)
- Loading branch information
Showing
6 changed files
with
32 additions
and
31 deletions.
There are no files selected for viewing
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
21 changes: 0 additions & 21 deletions
21
save-backend/src/main/kotlin/com/saveourtool/save/backend/utils/LongUtils.kt
This file was deleted.
Oops, something went wrong.
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
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
18 changes: 18 additions & 0 deletions
18
save-cloud-common/src/jvmMain/kotlin/com/saveourtool/save/utils/DateTimeUtilsJvm.kt
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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
/** | ||
* Utility methods related to a Date and Time in JVM | ||
*/ | ||
|
||
package com.saveourtool.save.utils | ||
|
||
import java.time.LocalDateTime | ||
import java.time.ZoneOffset | ||
|
||
import kotlinx.datetime.toJavaInstant | ||
|
||
/** | ||
* Function to convert long number of seconds to LocalDateTime | ||
* | ||
* @return an instance of [LocalDateTime] | ||
*/ | ||
@Suppress("FUNCTION_NAME_INCORRECT_CASE") | ||
fun Long.secondsToJLocalDateTime(): LocalDateTime = LocalDateTime.ofInstant(secondsToInstant().toJavaInstant(), ZoneOffset.UTC) |
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