fixed: there were mktime() used on some dirs Items
so sometimes the time of the dir was changed now for converting tm into time_t use: time_t Time(const tm & par); time_t Time(const tm * par); tm Time(time_t par); from core/misc.h now winix internally use GMT time only when printing it is converted to local user time temporarily all users use the same local time (config: time_zone_offset) (only logs are genereted with local system time) added to system: time_t LocalTime(time_t gmt_time); tm LocalTime(const tm * ptm); tm LocalTime(const tm & ptm); they convert GMT time to local user time git-svn-id: svn://ttmath.org/publicrep/winix/trunk@666 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
15
core/misc.h
15
core/misc.h
@@ -14,8 +14,8 @@
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <ctime>
|
||||
#include "item.h"
|
||||
#include <cstdio>
|
||||
#include "item.h"
|
||||
|
||||
|
||||
void ToString(std::string & s, int value);
|
||||
@@ -34,13 +34,16 @@ std::string HtmlEscapeFormTxt(const std::string & in);
|
||||
|
||||
const char * DateToStr(int year, int month, int day);
|
||||
const char * DateToStr(int year, int month, int day, int hour, int min, int sec);
|
||||
const char * DateToStr(tm * ptm);
|
||||
const char * DateToStr(const tm * ptm);
|
||||
const char * DateToStr(const tm & rtm);
|
||||
const char * DateToStr(time_t t);
|
||||
const char * DateToStrWithoutHours(tm * ptm);
|
||||
const char * DateToStrWithoutHours(const tm * ptm);
|
||||
const char * DateToStrWithoutHours(const tm & rtm);
|
||||
const char * DateToStrWithoutHours(time_t t);
|
||||
|
||||
const char * DateToStrCookie(int year, int month, int day, int hour, int min, int sec);
|
||||
const char * DateToStrCookie(tm * ptm);
|
||||
const char * DateToStrCookie(const tm * ptm);
|
||||
const char * DateToStrCookie(const tm & rtm);
|
||||
const char * DateToStrCookie(time_t t);
|
||||
|
||||
const char * IpToStr(unsigned int ip_);
|
||||
@@ -76,4 +79,8 @@ bool CopyFile(const std::string & src, const std::string & dst);
|
||||
const char * GetFileExt(const char * name);
|
||||
Item::Auth SelectFileType(const char * file_name);
|
||||
|
||||
time_t Time(const tm & par);
|
||||
time_t Time(const tm * par);
|
||||
tm Time(time_t par);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user