mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-19 00:43:07 +02:00
Unit tests:
- TZ related bug in date.t.cpp (test 78). 1234567890 is 2/14 in CET. Changed epoch to 1234526400 which is 2/13/2009 12:00:00 UTC.
This commit is contained in:
parent
5d775fdc3e
commit
dd10bf52e7
1 changed files with 5 additions and 5 deletions
|
@ -161,11 +161,11 @@ int main (int argc, char** argv)
|
|||
t.is (iso.toISO (), "20010909T014640Z", "1,000,000,000 -> 20010909T014640Z");
|
||||
|
||||
// Quantization.
|
||||
Date quant (1234567890);
|
||||
t.is (quant.startOfDay ().toString ("YMDHNS"), "20090213000000", "1234567890 -> 2/13/2009 18:31:30 -> 2/13/2009 0:00:00");
|
||||
t.is (quant.startOfWeek ().toString ("YMDHNS"), "20090208000000", "1234567890 -> 2/13/2009 18:31:30 -> 2/8/2009 0:00:00");
|
||||
t.is (quant.startOfMonth ().toString ("YMDHNS"), "20090201000000", "1234567890 -> 2/13/2009 18:31:30 -> 2/1/2009 0:00:00");
|
||||
t.is (quant.startOfYear ().toString ("YMDHNS"), "20090101000000", "1234567890 -> 2/13/2009 18:31:30 -> 1/1/2009 0:00:00");
|
||||
Date quant (1234526400);
|
||||
t.is (quant.startOfDay ().toString ("YMDHNS"), "20090213000000", "1234526400 -> 2/13/2009 12:00:00 UTC -> 2/13/2009 0:00:00");
|
||||
t.is (quant.startOfWeek ().toString ("YMDHNS"), "20090208000000", "1234526400 -> 2/13/2009 12:00:00 UTC -> 2/8/2009 0:00:00");
|
||||
t.is (quant.startOfMonth ().toString ("YMDHNS"), "20090201000000", "1234526400 -> 2/13/2009 12:00:00 UTC -> 2/1/2009 0:00:00");
|
||||
t.is (quant.startOfYear ().toString ("YMDHNS"), "20090101000000", "1234526400 -> 2/13/2009 12:00:00 UTC -> 1/1/2009 0:00:00");
|
||||
|
||||
// Date parsing.
|
||||
Date fromString1 ("1/1/2008");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue