[Adium-devl] TestDateFormatterStringRepWithInterval unit test failures
Peter Hosey
boredzo at gmail.com
Sun Dec 9 19:12:55 UTC 2007
On Dec 09, 2007, at 08:19:44, Evan Schoenberg wrote:
> The TestDateFormatterStringRepWithInterval unit tests are now
> failing, presumably because some of them cross the daylight savings
> time line since they compare dates in the past with the current
> date. Does timeIntervalSinceDate: simply ignore DST which is why
> we have to manually adjust the target date to match the current one?
I honestly have no idea what the correct behavior is.
For now, I've taken out the DST-adjustment from all the methods that
include an hour offset; all the tests now pass. But I'm not certain
that this is the correct solution.
Somebody should do some tests to see what dates
dateByAddingYears:months:days:hours:minutes:seconds: returns for
different pairs of dates.
Come to think of it, I think we should hard-code several dates in the
test class (as opposed to simply “now”), and run the tests on each:
1. One date that is five seconds after the start of DST.
2. One date that is five seconds after the end of DST.
3. One date that keeps all the ranges within DST.
4. One date that keeps all the ranges within standard time.
5. One date to bring them all, and in the darkness bind them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20071209/f4d09cb9/attachment.sig>
More information about the devel
mailing list