divyang4481 / mipt-hw

Automatically exported from code.google.com/p/mipt-hw
0 stars 0 forks source link

task_06 TDateTime #247

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
\baldin_dima\task06_TDateTime

Original issue reported on code.google.com by dmitryba...@gmail.com on 18 May 2013 at 1:33

GoogleCodeExporter commented 9 years ago
Пишу в main след код:
        TDateTime d1 = TDateTime::Now();
        cout << d1 << endl;

        TTimeSpan sp(1, 1, 1, 1, 1, 1);
        TDateTime d2 = d1 + sp;
        TDateTime d3 = d2 - sp;
        cout << d2 << endl
            << d3 << endl;

        d1 = d1 + sp;
        cout << d1 << endl;
        d1 = d1 - sp;
        cout << d1 << endl;

Запускаю:
19:07:54 19.05.2013
21:08:55 20.06.2014
19:07:54 19.05.2013
21:08:55 20.06.2014
19:07:54 19.05.2013

Во второй строчке вывода я ожидаю увидеть 
момент через 1 год 1 месяц 1 день 1 час 1 
минуту 1 секунду от текущего.
Очевидно, по часам разница не 1.

Решение не принято.

Original comment by aivyu...@gmail.com on 19 May 2013 at 3:09

GoogleCodeExporter commented 9 years ago
Странно, но у меня выводит всё как нужно) В 
чем тогда может быть дело?

Original comment by dmitryba...@gmail.com on 19 May 2013 at 4:52

GoogleCodeExporter commented 9 years ago

Original comment by dmitryba...@gmail.com on 25 May 2013 at 8:44

GoogleCodeExporter commented 9 years ago
Решение принято.

Минус 40%.

Original comment by aivyu...@gmail.com on 26 May 2013 at 12:30