本文整理汇总了C++中Ztring::Date_From_Milliseconds_1601方法的典型用法代码示例。如果您正苦于以下问题:C++ Ztring::Date_From_Milliseconds_1601方法的具体用法?C++ Ztring::Date_From_Milliseconds_1601怎么用?C++ Ztring::Date_From_Milliseconds_1601使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ztring
的用法示例。
在下文中一共展示了Ztring::Date_From_Milliseconds_1601方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Created_Get
//---------------------------------------------------------------------------
Ztring File::Created_Get()
{
#ifdef ZENLIB_USEWX
if (File_Handle==NULL)
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
//if (File_Handle==-1)
if (File_Handle==NULL)
#elif defined WINDOWS
if (File_Handle==NULL)
#endif
#endif //ZENLIB_USEWX
return Ztring();
#ifdef ZENLIB_USEWX
return Ztring(); //Not implemented
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
return Ztring(); //Not implemented
#elif defined WINDOWS
FILETIME TimeFT;
if (GetFileTime(File_Handle, &TimeFT, NULL, NULL))
{
int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime;
Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
return Time;
}
else
return Ztring(); //There was a problem
#endif
#endif //ZENLIB_USEWX
}
示例2: Modified_Local_Get
//---------------------------------------------------------------------------
Ztring File::Modified_Local_Get()
{
#ifdef ZENLIB_USEWX
if (File_Handle==NULL)
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
//if (File_Handle==-1)
if (File_Handle==NULL)
#elif defined WINDOWS
if (File_Handle==NULL)
#endif
#endif //ZENLIB_USEWX
return Ztring();
#ifdef ZENLIB_USEWX
return Ztring(); //Not implemented
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
struct stat Stat;
int Result=stat(File_Name.To_Local().c_str(), &Stat);
if (Result<0)
return Ztring(); //Error
Ztring Time; Time.Date_From_Seconds_1970_Local(Stat.st_mtime);
return Time;
#elif defined WINDOWS
FILETIME TimeFT;
if (GetFileTime(File_Handle, NULL, NULL, &TimeFT))
{
int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime; //100-ns
TIME_ZONE_INFORMATION Info;
DWORD Result=GetTimeZoneInformation(&Info);
if (Result!=TIME_ZONE_ID_INVALID)
{
Time64-=((int64s)Info.Bias)*60*1000*1000*10;
if (Result==TIME_ZONE_ID_DAYLIGHT)
Time64-=((int64s)Info.DaylightBias)*60*1000*1000*10;
else
Time64-=((int64s)Info.StandardBias)*60*1000*1000*10;
}
Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
Time.FindAndReplace(_T("UTC "), _T(""));
return Time;
}
else
return Ztring(); //There was a problem
#endif
#endif //ZENLIB_USEWX
}
示例3: Created_Local_Get
//---------------------------------------------------------------------------
Ztring File::Created_Local_Get()
{
#ifdef ZENLIB_USEWX
if (File_Handle==NULL)
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
//if (File_Handle==-1)
if (File_Handle==NULL)
#elif defined WINDOWS
if (File_Handle==NULL)
#endif
#endif //ZENLIB_USEWX
return _T("");
#ifdef ZENLIB_USEWX
return _T(""); //Not implemented
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
return _T(""); //Not implemented
#elif defined WINDOWS
FILETIME TimeFT;
if (GetFileTime(File_Handle, &TimeFT, NULL, NULL))
{
int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime;
TIME_ZONE_INFORMATION Info;
DWORD Result=GetTimeZoneInformation(&Info);
if (Result!=TIME_ZONE_ID_INVALID)
{
Time64-=((int64s)Info.Bias)*60*1000*1000*10;
if (Result==TIME_ZONE_ID_DAYLIGHT)
Time64-=((int64s)Info.DaylightBias)*60*1000*1000*10;
else
Time64-=((int64s)Info.StandardBias)*60*1000*1000*10;
}
Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
Time.FindAndReplace(_T("UTC "), _T(""));
return Time;
}
else
return _T(""); //There was a problem
#endif
#endif //ZENLIB_USEWX
}
示例4: Modified_Get
//---------------------------------------------------------------------------
Ztring File::Modified_Get()
{
#ifdef ZENLIB_USEWX
if (File_Handle==NULL)
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
if (File_Handle==NULL)
#elif defined WINDOWS
if (File_Handle==NULL)
#endif
#endif //ZENLIB_USEWX
return Ztring();
#ifdef ZENLIB_USEWX
return Ztring(); //Not implemented
#else //ZENLIB_USEWX
#ifdef ZENLIB_STANDARD
struct stat Stat;
int Result=stat(File_Name.To_Local().c_str(), &Stat);
if (Result<0)
return Ztring(); //Error
Ztring Time; Time.Date_From_Seconds_1970(Stat.st_mtime);
return Time;
#elif defined WINDOWS
FILETIME TimeFT;
if (GetFileTime(File_Handle, NULL, NULL, &TimeFT))
{
int64u Time64=0x100000000ULL*TimeFT.dwHighDateTime+TimeFT.dwLowDateTime;
Ztring Time; Time.Date_From_Milliseconds_1601(Time64/10000);
return Time;
}
else
return Ztring(); //There was a problem
#endif
#endif //ZENLIB_USEWX
}