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:
@@ -318,7 +318,7 @@ localefilter.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
localefilter.o: ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
localefilter.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
localefilter.o: ../../pikotools/utf8/utf8.h ../core/misc.h
|
||||
localefilter.o: ../core/requesttypes.h
|
||||
localefilter.o: ../core/requesttypes.h ../../pikotools/date/date.h
|
||||
login.o: templates.h ../../ezc/src/ezc.h ../../ezc/src/generator.h
|
||||
login.o: ../../ezc/src/pattern.h ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
login.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
@@ -498,16 +498,16 @@ mount.o: ../core/threadmanager.h ../core/sessionmanager.h
|
||||
mount.o: ../core/sessioncontainer.h ../core/system.h ../core/htmlfilter.h
|
||||
mount.o: ../core/misc.h ../core/mounts.h
|
||||
patterncacher.o: patterncacher.h ../core/item.h ../../pikotools/space/space.h
|
||||
patterncacher.o: misc.h localefilter.h locale.h
|
||||
patterncacher.o: ../../pikotools/date/date.h misc.h localefilter.h locale.h
|
||||
patterncacher.o: ../../pikotools/space/spaceparser.h
|
||||
patterncacher.o: ../../pikotools/space/space.h ../../ezc/src/ezc.h
|
||||
patterncacher.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
patterncacher.o: ../../ezc/src/item.h ../../ezc/src/funinfo.h
|
||||
patterncacher.o: ../../ezc/src/functions.h ../../ezc/src/stringconv.h
|
||||
patterncacher.o: ../../pikotools/utf8/utf8.h htmltextstream.h
|
||||
patterncacher.o: ../core/textstream.h ../../pikotools/date/date.h
|
||||
patterncacher.o: ../core/log.h ../core/textstream.h ../core/logmanipulators.h
|
||||
patterncacher.o: ../core/slog.h ../core/cur.h ../templates/locale.h
|
||||
patterncacher.o: ../core/textstream.h ../core/log.h ../core/textstream.h
|
||||
patterncacher.o: ../core/logmanipulators.h ../core/slog.h ../core/cur.h
|
||||
patterncacher.o: ../templates/locale.h
|
||||
patterns.o: patterns.h locale.h ../../pikotools/space/spaceparser.h
|
||||
patterns.o: ../../pikotools/space/space.h localefilter.h ../../ezc/src/ezc.h
|
||||
patterns.o: ../../ezc/src/generator.h ../../ezc/src/pattern.h
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -340,15 +340,15 @@ void dir_last_url_is(Info & i)
|
||||
|
||||
void dir_last_date_creation(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->dir_tab.back()->date_creation);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->dir_tab.back()->date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void dir_last_date_modification(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->dir_tab.back()->date_modification);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->dir_tab.back()->date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
@@ -367,15 +367,10 @@ void dir_last_date_modification_nice(Info & i)
|
||||
|
||||
void dir_last_dates_equal(Info & i)
|
||||
{
|
||||
tm * ptm1 = &cur->request->dir_tab.back()->date_creation;
|
||||
tm * ptm2 = &cur->request->dir_tab.back()->date_modification;
|
||||
PT::Date & date1 = cur->request->dir_tab.back()->date_creation;
|
||||
PT::Date & date2 = cur->request->dir_tab.back()->date_modification;
|
||||
|
||||
i.res = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
ptm1->tm_min == ptm2->tm_min &&
|
||||
ptm1->tm_sec == ptm2->tm_sec;
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -412,12 +412,12 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const PT::Space & space)
|
||||
{
|
||||
space_stream.Clear();
|
||||
tmp_stream.Clear();
|
||||
// !! IMPROVE ME
|
||||
// we can calculate how many memory is needed beforehand
|
||||
space.Serialize(space_stream, true, false);
|
||||
operator<<(space_stream.Str());
|
||||
space_stream.Clear();
|
||||
space.Serialize(tmp_stream, true, false);
|
||||
operator<<(tmp_stream.Str());
|
||||
tmp_stream.Clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
@@ -425,7 +425,12 @@ return *this;
|
||||
|
||||
HtmlTextStream & HtmlTextStream::operator<<(const PT::Date & date)
|
||||
{
|
||||
date.Serialize(*this);
|
||||
tmp_stream.Clear();
|
||||
// !! IMPROVE ME
|
||||
// we can calculate how many memory is needed beforehand
|
||||
date.Serialize(tmp_stream);
|
||||
operator<<(tmp_stream.Str());
|
||||
tmp_stream.Clear();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -149,7 +149,7 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
TextStream<std::wstring> space_stream; // for serializing spaces
|
||||
TextStream<std::wstring> tmp_stream;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -244,15 +244,15 @@ void item_users_different(Info & i)
|
||||
|
||||
void item_date_creation(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->item.date_creation);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->item.date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void item_date_modification(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->item.date_modification);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->item.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
@@ -270,15 +270,10 @@ void item_date_modification_nice(Info & i)
|
||||
|
||||
void item_dates_equal(Info & i)
|
||||
{
|
||||
tm * ptm1 = &cur->request->item.date_creation;
|
||||
tm * ptm2 = &cur->request->item.date_modification;
|
||||
PT::Date & date1 = cur->request->item.date_creation;
|
||||
PT::Date & date2 = cur->request->item.date_modification;
|
||||
|
||||
i.res = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
ptm1->tm_min == ptm2->tm_min &&
|
||||
ptm1->tm_sec == ptm2->tm_sec;
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
|
||||
|
||||
@@ -601,8 +596,8 @@ void item_tab_date_creation(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->item_tab[item_index].date_creation);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->item_tab[item_index].date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -611,8 +606,8 @@ void item_tab_date_modification(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->item_tab[item_index].date_modification);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->item_tab[item_index].date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -640,15 +635,10 @@ void item_tab_dates_equal(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
tm * ptm1 = &cur->request->item_tab[item_index].date_creation;
|
||||
tm * ptm2 = &cur->request->item_tab[item_index].date_modification;
|
||||
PT::Date & date1 = cur->request->item_tab[item_index].date_creation;
|
||||
PT::Date & date2 = cur->request->item_tab[item_index].date_modification;
|
||||
|
||||
i.res = ptm1->tm_year == ptm2->tm_year &&
|
||||
ptm1->tm_mon == ptm2->tm_mon &&
|
||||
ptm1->tm_mday == ptm2->tm_mday &&
|
||||
ptm1->tm_hour == ptm2->tm_hour &&
|
||||
ptm1->tm_min == ptm2->tm_min &&
|
||||
ptm1->tm_sec == ptm2->tm_sec;
|
||||
i.res = date1 == date2;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2008-2010, Tomasz Sowa
|
||||
* Copyright (c) 2008-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -68,7 +68,7 @@ void last_tab_start(Info & i)
|
||||
if( !last_init() )
|
||||
return;
|
||||
|
||||
i.out << DateToStr(&last_iterator->start);
|
||||
i.out << DateToStr(last_iterator->start);
|
||||
}
|
||||
|
||||
|
||||
@@ -78,7 +78,7 @@ void last_tab_end(Info & i)
|
||||
return;
|
||||
|
||||
if( last_iterator->IsLoggedOut() )
|
||||
i.out << DateToStr(&last_iterator->end);
|
||||
i.out << DateToStr(last_iterator->end);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -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.
|
||||
*
|
||||
*/
|
||||
@@ -38,7 +38,7 @@ HtmlTextStream::RawText<RawType> R(const RawType & par)
|
||||
void HtmlEscapeFormTxt(HtmlTextStream & out, const std::wstring & in);
|
||||
|
||||
|
||||
void print_date_nice(Info & i, const tm & rtm);
|
||||
void print_date_nice(Info & i, const PT::Date & date);
|
||||
void print_user_name(Info & i, const User * puser, const std::wstring & guest_name);
|
||||
|
||||
|
||||
|
||||
@@ -71,15 +71,15 @@ void stat_item_privileges(Info & i)
|
||||
|
||||
void stat_item_date_creation(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->last_item->date_creation);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->last_item->date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
void stat_item_date_modification(Info & i)
|
||||
{
|
||||
tm rtm = system->LocalTime(cur->request->last_item->date_modification);
|
||||
i.out << DateToStr(rtm.tm_year + 1900, rtm.tm_mon + 1, rtm.tm_mday, rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
PT::Date date = system->LocalTime(cur->request->last_item->date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,9 +30,9 @@ void winix_cur_time(Info & i)
|
||||
{
|
||||
static char buffer[100];
|
||||
|
||||
tm rtm = Time(std::time(0));
|
||||
PT::Date & date = cur->request->start_date;
|
||||
|
||||
sprintf(buffer, "%02d:%02d:%02d", rtm.tm_hour, rtm.tm_min, rtm.tm_sec);
|
||||
sprintf(buffer, "%02d:%02d:%02d", date.hour, date.min, date.sec);
|
||||
i.out << buffer;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user