本文整理汇总了C++中CTime::FormatGmt方法的典型用法代码示例。如果您正苦于以下问题:C++ CTime::FormatGmt方法的具体用法?C++ CTime::FormatGmt怎么用?C++ CTime::FormatGmt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CTime
的用法示例。
在下文中一共展示了CTime::FormatGmt方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: DoSave
//bool CBuilderDlg::DoFileOpen(const CString & sPathName)
//{
// Help Alligning with BuilderDlg COmpare
//}
bool CAttributeDlg::DoSave(bool attrOnly)
{
CWaitCursor wait;
CString ecl;
m_view.GetText(ecl);
CString id = m_attribute->GetID();
CString user = m_attribute->GetModifiedBy();
CString module = m_attribute->GetModuleQualifiedLabel();
CString attributeName = m_attribute->GetLabel();
IAttributeType* attrType = m_attribute->GetType();
CBookmarksFrame * pFrame = GetBookmarksFrame();
if (pFrame)
{
pFrame->ParseBookmarksEcl((LPCTSTR)ecl, (LPCTSTR)user, (LPCTSTR)id, (LPCTSTR)module, (LPCTSTR)attributeName, attrType);
}
if (m_attribute->SetText(ecl))
{
// Save local item for history ---
boost::filesystem::path path;
GetIConfig(QUERYBUILDER_CFG)->GetEnvironmentFolder(path);
path /= stringToPath(m_attribute->GetModuleQualifiedLabel());
boost::filesystem::create_directories(path);
path /= stringToPath(m_attribute->GetLabel());
boost::filesystem::create_directories(path);
CTime t = CTime::GetCurrentTime();
std::_tstring now = t.FormatGmt(_T("%Y-%m-%dT%H_%M_%SZ.ecl"));
path /= stringToPath(now);
CUnicodeFile file;
file.Create(pathToWString(path).c_str());
file.Write(ecl);
file.Close();
// --- --- ---
m_view.SetSavePoint();
IAttributeVector attrs;
Dali::CEclExceptionVector errors;
m_attribute->PreProcess(PREPROCESS_SAVE, NULL, attrs, errors);
SendMessage(CWM_SUBMITDONE, Dali::WUActionCheck, (LPARAM)&errors);
if (attrs.size())
{
if (!m_migrator)
m_migrator = CreateIMigration(::AttachRepository(), false);
m_migrator->Stop();
for(IAttributeVector::const_iterator itr = attrs.begin(); itr != attrs.end(); ++itr)
m_migrator->AddToRep(m_attribute->GetModule()->GetRootModule(), itr->get()->GetAsHistory(), (boost::_tformat(_T("Preprocessed (%1%) from %2%.")) % PREPROCESS_LABEL[PREPROCESS_SAVE] % m_attribute->GetQualifiedLabel()).str().c_str(), true);
m_migrator->Start();
SetTimer(0, 200);
}
return true;
}
return false;
}