On Thursday, November 03, 2011 11:03:36 am Hans-Peter Diettrich wrote: > Sven Barth schrieb: > > And functions like DateTimeToStr don't care whether a time value is > > local or UTC and in my opinion they even MUST NOT. > > Splitting the TDateTime into year, month etc. is done by a DecodeDate... > function, that *assumes* that TDateTime contains a local time. When you > feed it an UTC time, the result is unusable.
What? How does it assume it's in local time? It assumes it has received the value you want decoded. The value 40850.5 treated as a TDateTime is 03 NOV 2011 @ 12:00. No matter what time zone it's expressed in, the result is the same, but in that zone. If you want a different zone, you have to add in the offset before decoding. How is that unusable? Best regards, Pete C.
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel