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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user