#1 2020-09-14 06:03:10

Mr.Ed
Member
Registered: 2020-04-09
Posts: 2

unexpected date behaviour

Hi ab, I got problems with unexpected date behaviour.

  SysUtils.TryEncodeDate(1776, 7, 4, d1);
  SynCommons.TryEncodeDate(1776, 7, 4, d2);
  CheckSame(d1 {-45103}, d2 {4294922193});

This also applies to Iso8601ToDateTimePUTF8CharVar conversion. An explicit type cast from Cardinal to Integer should fix it.

Offline

#2 2020-09-14 07:30:45

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: unexpected date behaviour

Offline

Board footer

Powered by FluxBB