removed: dependencies to 'tz' system structure

now we are using PT::Date from pikotools



git-svn-id: svn://ttmath.org/publicrep/winix/trunk@839 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
2012-05-26 23:04:49 +00:00
parent 5b845f1d03
commit 1b858f5782
41 changed files with 651 additions and 764 deletions

View File

@@ -2,7 +2,7 @@
* This file is a part of Winix
* and is not publicly distributed
*
* Copyright (c) 2010-2011, Tomasz Sowa
* Copyright (c) 2010-2012, Tomasz Sowa
* All rights reserved.
*
*/
@@ -62,18 +62,15 @@ int was_enter = 0; // how many enteres there were before
void print_date_nice(Info & i, const tm & rtm)
void print_date_nice(Info & i, const PT::Date & date)
{
time_t t = Time(rtm);
time_t now = std::time(0);
time_t one_day = 60 * 60 * 24;
tm ltm = system->LocalTime(rtm);
PT::Date ltm = system->LocalTime(date);
if( t + one_day > now )
i.out << DateToStr(ltm.tm_year + 1900, ltm.tm_mon + 1, ltm.tm_mday, ltm.tm_hour, ltm.tm_min, ltm.tm_sec);
if( date + one_day > cur->request->start_time )
i.out << DateToStr(ltm.year, ltm.month, ltm.day, ltm.hour, ltm.min, ltm.sec);
else
i.out << DateToStr(ltm.tm_year + 1900, ltm.tm_mon + 1, ltm.tm_mday);
i.out << DateToStr(ltm.year, ltm.month, ltm.day);
}