本文整理汇总了C++中wxDateTime::FormatISOTime方法的典型用法代码示例。如果您正苦于以下问题:C++ wxDateTime::FormatISOTime方法的具体用法?C++ wxDateTime::FormatISOTime怎么用?C++ wxDateTime::FormatISOTime使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxDateTime
的用法示例。
在下文中一共展示了wxDateTime::FormatISOTime方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DateToAnsiStr
wxString DateToAnsiStr(const wxDateTime &datetime)
{
if (!datetime.IsValid())
return wxEmptyString;
return datetime.FormatISODate() + wxT(" ") + datetime.FormatISOTime();
}
示例2: saveData
void HumanoidDataLogger::saveData()
{
const wxDateTime now = wxDateTime::UNow();
wxString dataDirectory(dataSaveDirectory.c_str(),wxConvUTF8);
wxString curFilePath = dataDirectory + wxT("/recentData.dat");
dataDirectory += now.FormatISODate();
wxString dataFile = now.FormatISODate() + wxT("_") + now.FormatISOTime() + wxT(".dat");
dataFile.Replace(wxT(":"), wxT("-"));
wxString dataPath = dataDirectory + wxT("/") + dataFile;
if(! wxDirExists(dataDirectory))
{
wxMkdir(dataDirectory);
}
stringstream ss;
ss << dataPath.mb_str();
setFile(ss.str());
writeRecords();
FILE * curFile = fopen(curFilePath.mb_str(),"w");
fprintf(curFile, "%s",ss.str().c_str());
fclose(curFile);
}
示例3: SetCreateTime
void TrackPoint::SetCreateTime( wxDateTime dt )
{
wxString ts;
if(dt.IsValid())
ts = dt.FormatISODate().Append(_T("T")).Append(dt.FormatISOTime()).Append(_T("Z"));
SetCreateTime(ts);
}
示例4: GetDisplayTime
wxString DashboardInstrument_Clock::GetDisplayTime( wxDateTime UTCtime )
{
wxString result( _T( "---" ) );
if ( UTCtime.IsValid() ) {
if ( getUTC() ) {
result = UTCtime.FormatISOTime().Append( _T( " UTC" ) );
return result;
}
wxDateTime displayTime;
if ( g_iUTCOffset != 0 ) {
wxTimeSpan offset( 0, g_iUTCOffset * 30, 0 );
displayTime = UTCtime.Add( offset );
}
else {
displayTime = UTCtime.FromTimezone( wxDateTime::UTC );
}
result = displayTime.FormatISOTime().Append( _T( " LCL" ) );
}
return result;
}