Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RealmInstant.now implementation on Android uses API 26 > minSDK 16 #1572

Merged
merged 3 commits into from
Nov 30, 2023

Conversation

nhachicha
Copy link
Collaborator

Fixes #1564

@@ -36,3 +39,12 @@ public actual fun assetFileAsStream(assetFilename: String): InputStream = try {
// Returns the default logger for the platform
public actual fun createDefaultSystemLogger(tag: String, logLevel: LogLevel): RealmLogger =
LogCatLogger(tag, logLevel)

public actual fun currentTime(): RealmInstant {
return if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should document that there is some precision loss depending on the SDK version used.

@nhachicha nhachicha merged commit 882d432 into main Nov 30, 2023
2 checks passed
@nhachicha nhachicha deleted the nh/RealmInstant_now branch November 30, 2023 13:44
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RealmInstant.now() requires Android SDK 26 minSDK is 16
3 participants