View Issue Details

IDProjectCategoryView StatusLast Update
0035710FPCRTLpublic2019-06-12 16:11
ReporterOndrej Pokorny Assigned To 
Status newResolutionopen 
Summary0035710: DateToISO8601 returns wrong result if summertime and wintertime differ
DescriptionIf summertime and wintertime differ (like it is in central Europe), DateToISO8601 returns a datetime with wrong timezone offset for the other time different from Now.
Steps To Reproduceprogram Project1;
{$ifdef dcc}
uses SysUtils, DateUtils;
  Writeln(DateToISO8601(IncMonth(Now, 6), False));

Tested on 2019-06-12:
Delphi returns: 2019-12-12T16:01:43.00+01:00 (correct)
FPC returns: 2019-12-12T16:01:43.000+02:00 (wrong)
Additional InformationDateToISO8601 uses GetLocalTimeOffset that is not DateTime-aware. It must be made DateTime aware because the offset can vary during the year.
TagsNo tags attached.
Fixed in Revision
Attached Files

Issue History

Date Modified Username Field Change
2019-06-12 16:07 Ondrej Pokorny New Issue
2019-06-12 16:11 Ondrej Pokorny Note Added: 0116694