Date.date is meant to build a Date.date from a specification. However it does not properly handle a provided timezone offset, and seems to be adding it to the date and time themselves.
Transcript
- val d = Date.date {year=2024, month=Date.Mar, day=14, hour=12, minute=30, second=0, offset = SOME (Time.fromSeconds 60)};
- Date.minute d;
val it = 31 : int
Expected Behavior
- val d = Date.date {year=2024, month=Date.Mar, day=14, hour=12, minute=30, second=0, offset = SOME (Time.fromSeconds 60)};
- Date.minute d;
val it = 30 : int
Namely, the local date and time should be preserved independently from the timezone offset
Steps to Reproduce
See transcript
Additional Information
This is implemented correctly in MLton and Poly/ML
Version
110.99.4 (Latest)
Operating System
OS Version
No response
Processor
System Component
Basis Library
Severity
Minor
Description
Date.date
is meant to build aDate.date
from a specification. However it does not properly handle a provided timezone offset, and seems to be adding it to the date and time themselves.Transcript
Expected Behavior
Namely, the local date and time should be preserved independently from the timezone offset
Steps to Reproduce
See transcript
Additional Information
This is implemented correctly in MLton and Poly/ML
Email address
skyler.soss@gmail.com