added: TimeZone struct (core)
this class has information about a time zone (utf offset, daylight saving time)
and methods for converting between UTC and local time
structs User and Config has a TimeZone object
System::ToLocal() and System::ToUTC() uses it for converting
(depending whether a user is logged or not)
git-svn-id: svn://ttmath.org/publicrep/winix/trunk@842 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -244,14 +244,14 @@ void item_users_different(Info & i)
|
||||
|
||||
void item_date_creation(Info & i)
|
||||
{
|
||||
PT::Date date = system->LocalTime(cur->request->item.date_creation);
|
||||
PT::Date date = system->ToLocal(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)
|
||||
{
|
||||
PT::Date date = system->LocalTime(cur->request->item.date_modification);
|
||||
PT::Date date = system->ToLocal(cur->request->item.date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
|
||||
@@ -596,7 +596,7 @@ void item_tab_date_creation(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date date = system->LocalTime(cur->request->item_tab[item_index].date_creation);
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].date_creation);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
@@ -606,7 +606,7 @@ void item_tab_date_modification(Info & i)
|
||||
{
|
||||
if( item_index < cur->request->item_tab.size() )
|
||||
{
|
||||
PT::Date date = system->LocalTime(cur->request->item_tab[item_index].date_modification);
|
||||
PT::Date date = system->ToLocal(cur->request->item_tab[item_index].date_modification);
|
||||
i.out << DateToStr(date.year, date.month, date.day, date.hour, date.min, date.sec);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user