当前位置: 首页>>代码示例>>C++>>正文


C++ wxDateTime::FormatISOTime方法代码示例

本文整理汇总了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();
}
开发者ID:swflb,项目名称:pgadmin3,代码行数:7,代码来源:misc.cpp

示例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);
}
开发者ID:idanceyang,项目名称:DynaMechs,代码行数:27,代码来源:HumanoidDataLogger.cpp

示例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);
}
开发者ID:SamsonovAnton,项目名称:OpenCPN,代码行数:8,代码来源:Track.cpp

示例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;
}
开发者ID:mookiejones,项目名称:OpenCPN,代码行数:20,代码来源:clock.cpp


注:本文中的wxDateTime::FormatISOTime方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。