View Issue Details

IDProjectCategoryView StatusLast Update
0035710FPCRTLpublic2019-06-12 16:11
ReporterOndrej PokornyAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status newResolutionopen 
Product VersionProduct Build 
Target VersionFixed in Version 
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}
{$APPTYPE CONSOLE}
{$endif}
uses SysUtils, DateUtils;
begin
  Writeln(DateToISO8601(IncMonth(Now, 6), False));
  Readln;
end.

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
FPCOldBugId
FPCTarget
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