Skip to content

ZonedDateTime::{plus,minus}{Minutes,Hours,Seconds} behaves differently to Java 8 #109

@JanTvrdik

Description

@JanTvrdik

In Java 8, for example ZonedDateTime.plusMinutes operates on the instant time-line, which means that zonedDateTime.plusMinutes(30) is the same as zonedDateTime.plus(Duration.ofMinutes(30)).

In this library, however,

$zonedDateTime->plusMinutes(30)

is different from

$zonedDateTime->plusDuration(Duration::ofMinutes(30))

If this is intentional behavior change then I think the documenation should be improved (see very good documenation of ZonedDateTime::of()).

If that is unintentional behavior change, that this may be considered a bug report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions