Hi, We do some calculations based on the number of days elapsed between two dates, by doing (date1 - date2) days * something. If these dates span over a daylight savings switch over, we get one day less, because the duration (result from date1 - date2) has 23 hours (+a number of days).
So, do we solve this kind of thing by working with UTC dates only? I read on the mailing list some changes in Pharo 2.0 made by Camiillo and http://forum.world.st/Should-Dates-be-Timezone-specific-td3647678.html. We're not on 2.0 yet and are running on GemStone. Our dates are in a local time zone currently, how do we "work" with UTC dates and make sure the outside world see the correct date / time? How do I write a test for this? Here's an example of such a calculation: returnFromPrice: fromPrice toPrice: toPrice | days | days := (toPrice date - fromPrice date) days. ^ (toPrice value / fromPrice value raisedTo: 365.25 / days) - 1 My issue is that the tests run in an environment without daylight savings. The customer is in a timezone with daylight savings. Thanks Otto
