Skip to content

Improved LocalDateTime documentation #248

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

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion core/common/src/LocalDateTime.kt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ import kotlinx.serialization.Serializable
* The main purpose of this class is to provide human-readable representations of [Instant] values, or to transfer them
* as data.
*
* The arithmetic on [LocalDateTime] values is not provided, since without accounting for the time zone transitions it may give misleading results.
* The arithmetic on [LocalDateTime] values is not provided, since without accounting for the time zone transitions it
* may give misleading results. For example, assuming March 26, 2023, 22:00 as a value of `LocalDateTime`, adding 10 hours
* is ambiguous because that is when daylight savings kick in in some time zones: for the US, if you just add 10 hours to
* the clock at this particular day, it would be 8:00, but if you just waited 10 hours, it would be 9:00.
*/
@Serializable(with = LocalDateTimeIso8601Serializer::class)
public expect class LocalDateTime : Comparable<LocalDateTime> {
Expand Down