On 03 Jun 2015, at 04:20, Esteban A. Maringolo <emaringolo@gmail.com> wrote:
I'm debugging the PostgresV3 driver for GLORP, and among other test failures, there is a kind that particularly bugs me: two identical dates do not match, the reason? The internal "start" of aDate (Timespan) is a DateAndTime, and as such has a timezone offset.
Is this conceptually right?
Esteban A. Maringolo
Yes, it is bit annoying and weird, but it all does make sense as well. The concept of a date cannot be seen independent from a timezone (day transitions are different for you than for me, new year starts at different moments depending on where you live). Defining a Date as the timespan of one day starting at a specific moment in time is correct. One thing you could try is to make the starting time UTC, a bit like Date today translateToUTC. DateAndTime now asUTC asDate. But I am not sure how much of your problems this would solve. Sven