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


C++ TDateTime::Minute方法代码示例

本文整理汇总了C++中TDateTime::Minute方法的典型用法代码示例。如果您正苦于以下问题:C++ TDateTime::Minute方法的具体用法?C++ TDateTime::Minute怎么用?C++ TDateTime::Minute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDateTime的用法示例。


在下文中一共展示了TDateTime::Minute方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: PopulateOffPeakListL

void CPigeonScheduledSend::PopulateOffPeakListL()
{
    //There are no existing off peak times set up
    //So no need to remember them
    iOffPeakList->Reset();

    TTime t;
    TDateTime d;
    t.HomeTime();
    t -= TTimeIntervalHours(1);
    d = t.DateTime();

    TTimeIntervalMinutes twoHours = 120;

    TMsvOffPeakTime current(t.DayNoInWeek(), d.Hour(), d.Minute(), twoHours);
    iOffPeakList->AppendL(current);

    t -= TTimeIntervalDays(1);
    d = t.DateTime();
    TMsvOffPeakTime yesterday(t.DayNoInWeek(), d.Hour(), d.Minute(), twoHours);
    iOffPeakList->AppendL(yesterday);

    t += TTimeIntervalDays(2);
    d = t.DateTime();
    TMsvOffPeakTime tomorrow(t.DayNoInWeek(), d.Hour(), d.Minute(), twoHours);
    iOffPeakList->AppendL(tomorrow);
}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:27,代码来源:pigeonservermtm.cpp

示例2: ParseFromXMLTimeString

// ---------------------------------------------------------------------------
// TPresCondValidity::ParseFromXMLTimeString()
// ---------------------------------------------------------------------------
//    
TInt TPresCondValidity::ParseFromXMLTimeString(const TDesC& aXMLTimeString, 
                                                         TTime& aUTCDateTime)
    {
    OPENG_DP(D_OPENG_LIT( " TPresCondValidity::ParseFromXMLTimeString()" ) );
    OPENG_DP(D_OPENG_LIT( "     ParseFromXMLTimeString aXMLTimeString = %S"), 
                                                                &aXMLTimeString);

    TInt err(KErrNone);
    
    // Initializing the locale
    TLocale myLocale, systemLocale;
    myLocale.Refresh();
    systemLocale.Refresh();
    myLocale.SetDateFormat(EDateJapanese);
    myLocale.SetDateSeparator('-',1);
    myLocale.SetDateSeparator('-',2);
    myLocale.SetDateSeparator('T',3);
    
    myLocale.SetTimeFormat(ETime24);
    myLocale.SetTimeSeparator(':',1);
    myLocale.SetTimeSeparator(':',2);
    myLocale.SetTimeSeparator(' ',3);
    myLocale.Set();

    TTime myTime;
    TTime myUTCtime;
    TChar uTCtimeSign(aXMLTimeString[23]); // 23 is ascii T
    
   
    // parsing main time
    TBuf<KPresDateTimeBufLength> dateTimeBuffer(aXMLTimeString);
    dateTimeBuffer.Delete(KPresDTWithoutUTCLength-1,6);
    dateTimeBuffer.Replace(KPresDTSeperatorPos,1,KPresSpaceString);
    myTime.Parse(dateTimeBuffer);
    
    // parsing utc time
    TBuf<KPresDateTimeBufLength> uTCbuffer(aXMLTimeString);
    uTCbuffer.Delete(0,KPresDTWithoutUTCLength);
    myUTCtime.Parse(uTCbuffer);
    TDateTime uTCDateTime = myUTCtime.DateTime();
    
    // adding or substracting utc from main time
    if(uTCtimeSign=='+') // if diff is positive
        {
        aUTCDateTime = myTime - TTimeIntervalHours(uTCDateTime.Hour());
        aUTCDateTime = aUTCDateTime - TTimeIntervalMinutes(uTCDateTime.Minute());            
        }
    else if(uTCtimeSign=='-')
        {
        aUTCDateTime = myTime + TTimeIntervalHours(uTCDateTime.Hour());
        aUTCDateTime = aUTCDateTime + TTimeIntervalMinutes(uTCDateTime.Minute());            
        }
    else
        err = KErrArgument;
    
    // putting the system locale back
    systemLocale.Set();
    return err;    
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:63,代码来源:prescondvalidity.cpp

示例3: CompareDate

TBool CHttpHdrTest::CompareDate(TDateTime aDate1, TDateTime aDate2)
	{
	return ((aDate1.Year() == aDate2.Year()) &&
			(aDate1.Month() == aDate2.Month()) &&
			(aDate1.Day() == aDate2.Day()) &&
			(aDate1.Hour() == aDate2.Hour()) &&
			(aDate1.Minute() == aDate2.Minute()) &&
			(aDate1.Second() == aDate2.Second()) &&
			(aDate1.MicroSecond() == aDate2.MicroSecond()));
	}
开发者ID:kuailexs,项目名称:symbiandump-mw2,代码行数:10,代码来源:t_httphdr.cpp

示例4: LogDateTime

// ---------------------------------------------------------------------------
// TPresCondValidity::LogDateTime()
// ---------------------------------------------------------------------------
//
void TPresCondValidity::LogDateTime(TDateTime aDateTime)
    {
    OPENG_DP(D_OPENG_LIT( "         %d, %d, %d, %d, %d, %d, %d"),
                    aDateTime.Year(), aDateTime.Month()+1, aDateTime.Day()+1,
                    aDateTime.Hour(), aDateTime.Minute(), aDateTime.Second(),
                                                    aDateTime.MicroSecond() );
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:11,代码来源:prescondvalidity.cpp

示例5: Debug

GLDEF_C void Debug( TRefByValue<const TDesC> aText, ... )
    {
    #ifdef WINS
    VA_LIST args;
    VA_START( args, aText );

    TBuf<KLogLineLength> buf;
    buf.FormatList( aText, args );

    RFileLogger logger;
    TInt ret=logger.Connect();
    if (ret==KErrNone)
        {
        logger.SetDateAndTime( EFalse,EFalse );
        logger.CreateLog( KLogFolder, KLogFileName, EFileLoggingModeAppend );       
        TBuf<KLogTimeFormatLength> timeStamp;
        TTime now;
        now.HomeTime();
        TDateTime dateTime;
        dateTime = now.DateTime();
        timeStamp.Format( KLogTimeFormat, 
            dateTime.Hour(), dateTime.Minute(),
            dateTime.Second(), dateTime.MicroSecond() );
        buf.Insert( 0, timeStamp );

        logger.Write(buf);
        }

    logger.Close();

    VA_END( args );
    #else
    RDebug::Print(aText);
    #endif
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:35,代码来源:WPWAPAdapterMain.cpp

示例6: TTimeIntervalSeconds

static struct tm& as_struct_tm (const time_t& t, struct tm& res)
{
    TTime us = UNIX_BASE + TTimeIntervalSeconds(t);
    TDateTime dt = us.DateTime();

    res.tm_sec  = dt.Second();
    res.tm_min  = dt.Minute();
    res.tm_hour = dt.Hour();
    res.tm_mday = dt.Day() + 1;
    res.tm_mon  = dt.Month();
    res.tm_year = dt.Year() - 1900;

    // EPOC32 counts the year day as Jan 1st == day 1
    res.tm_yday = us.DayNoInYear() - 1;

    // EPOC32 counts the weekdays from 0==Monday to 6==Sunday
    res.tm_wday = us.DayNoInWeek() + 1;
    if (res.tm_wday==7)
        res.tm_wday=0;	// Sunday==0 in a struct tm

    // newlib just sets this field to -1
    // tm_isdst doesn't really make sense here since we don't
    // know the locale for which to interpret this time.

    res.tm_isdst = -1;

    return res;
}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:28,代码来源:time.cpp

示例7: WriteSolutionTagL

// -----------------------------------------------------------------------------
// CCapInfo::WriteSolutionTagL()
// Writes SyncSolutionsService solution data to capability object.
// -----------------------------------------------------------------------------
//
void CCapInfo::WriteSolutionTagL( const TDesC& aContentName,
        const TSConSolutionInfo& aSolution )
    {
    TRACE_FUNC_ENTRY;
    _LIT( KFormatUID, "UID=0x%08x" );
    _LIT( KFormatName, "Name=%S" );
    _LIT( KFormatDate, "Timestamp=%04d%02d%02dT%02d%02d%02dZ" );
    
    WriteTagL( EExt, TXmlParser::EElementBegin );
    WriteValueL( EXNam, aContentName );
    
    TFileName temp;
    temp.Format( KFormatUID, aSolution.iUid );
    WriteValueL( EXVal, temp );
    
    temp.Format( KFormatName, &aSolution.iSolutionName );
    WriteValueL( EXVal, temp );
    
    if ( aSolution.iTime.Int64() != 0 )
        {
        // write time
        TDateTime time = aSolution.iTime.DateTime();
        temp.Format( KFormatDate, time.Year(), time.Month() + 1,
            time.Day() + 1, time.Hour(), time.Minute(), time.Second() );
        WriteValueL( EXVal, temp );
        
        }
    
    
    WriteTagL( EExt, TXmlParser::EElementEnd );
    TRACE_FUNC_EXIT;
    }
开发者ID:cdaffara,项目名称:symbiandump-ossapps,代码行数:37,代码来源:capinfo.cpp

示例8: FormatTimeSimple

void MemSpyEngineUtils::FormatTimeSimple( TDes& aBuf, const TTime& aTime )
    {
    const TDateTime dt = aTime.DateTime();
    //
    _LIT( KTimeFormatSpec, "%04d%02d%02d %02d:%02d:%02d" );
    aBuf.Format( KTimeFormatSpec, dt.Year(), dt.Month()+1, dt.Day()+1, dt.Hour(), dt.Minute(), dt.Second() );
    }
开发者ID:RomanSaveljev,项目名称:osrndtools,代码行数:7,代码来源:MemSpyEngineUtils.cpp

示例9: AddTime

void RTestExecuteLogServ::AddTime(TDes8& aLogBuffer)
	{
	TTime now;
	now.UniversalTime();
	TDateTime dateTime = now.DateTime();
	_LIT8(KFormat,"%02d:%02d:%02d:%03d ");
	// add the current time 
	aLogBuffer.AppendFormat(KFormat,dateTime.Hour(),dateTime.Minute(),dateTime.Second(),(dateTime.MicroSecond()/1000)); 
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:9,代码来源:client.cpp

示例10: AddTime

void CSerialWriter::AddTime(TDes8& aLogBuffer)
	{
	TTime now;
	now.UniversalTime();
	TDateTime dateTime = now.DateTime();
	_LIT8(KFormat,"%02d:%02d:%02d:%03d ");
	// add the current time 
	aLogBuffer.Append(KTEFNewLine) ; 
	aLogBuffer.AppendFormat(KFormat,dateTime.Hour(),dateTime.Minute(),dateTime.Second(),(dateTime.MicroSecond()/1000)); 
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:10,代码来源:serialwriter.cpp

示例11: WriteWithTimeStamp

void CSheduleServerLog::WriteWithTimeStamp(const TDesC& aText)
	{
	TBuf<200> buf;
	TTime now;
	now.HomeTime();
	TDateTime dateTime;
	dateTime = now.DateTime();
	buf.Format(_L("%02d.%02d:%02d:%06d "), dateTime.Hour(), dateTime.Minute(), dateTime.Second(), dateTime.MicroSecond());
	Write(buf);
	Write(aText);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:11,代码来源:SSCH_UTL.CPP

示例12: PrintCurrentTimeStamp

void CTe_RegConcurrentTestStepBase::PrintCurrentTimeStamp(TBool aStart)
	{
	TTime time;
	time.UniversalTime();
	TDateTime dateTime = time.DateTime();
	TBuf<32> timeBuf;
	timeBuf.Format(_L("%02d:%02d:%02d:%03d"), dateTime.Hour(), dateTime.Minute(), dateTime.Second(), dateTime.MicroSecond());
	TBuf<16> buf(aStart?_L("started"):_L("ended"));
	_LIT(KTimeFormat, "%S in server %S %S at %S");
	INFO_PRINTF5(KTimeFormat, &ConfigSection(), &GetServerName(), &buf, &timeBuf);
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:11,代码来源:te_regconcurrentteststepbase.cpp

示例13: StartTimer

// -----------------------------------------------------------------------------
// CUpdateManager::StartTimer
//
// Start timer.
// -----------------------------------------------------------------------------
//
void CUpdateManager::StartTimer()
    {
    TTime  time;
    time.HomeTime();
    TDateTime dateTime = time.DateTime();
    iMins = dateTime.Hour() * 60 + dateTime.Minute();
    TTimeIntervalMinutes interval(KMinFrequency - iMins % KMinFrequency);
    time += interval;

    At(time);
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:17,代码来源:UpdateManager.cpp

示例14: TimeFormat

void CRuleManager::TimeFormat(const TTime& aTime,TDes8& aDes)
	{
	TDateTime time = aTime.DateTime();
	TInt hour,minute;	
	hour = time.Hour() ;
	minute = time.Minute() ;
	
	aDes.AppendNum(hour);
	aDes.Append(':');
	aDes.AppendNum(minute);
	}
开发者ID:flaithbheartaigh,项目名称:lemonplayer,代码行数:11,代码来源:RuleManager.cpp

示例15: difftime

CIpuTestHarness::~CIpuTestHarness()
//
//	D'tor
	{
	TTime endtime;
	endtime.UniversalTime();

	// Do resource handle leak test?
	if (iDoResourceLeakTest)
		ResourceLeakTest();

	//	End of tests - see if failed or ok
	if (iFailedTests->Count())
		{
		TestHarnessFailed();
		}
	else
		{
		TestHarnessComplete();
		}

	iFailedTests->ResetAndDestroy();
	delete iFailedTests;

	//	Log finish time
	TDateTime t = endtime.DateTime();
	LogIt(_L("Ended @ %d:%d:%d:%d"),t.Hour(),t.Minute(),t.Second(),t.MicroSecond());
	TTime difftime(endtime.Int64() - iStartTime.Int64());
	t = difftime.DateTime();
	LogIt(_L("Execution time %d:%d:%d:%d"),t.Hour(),t.Minute(),t.Second(),t.MicroSecond());

	//	Close logs and test harness
	iFlogger.CloseLog();
	
	// iTest test harness performs UHEAP MARK/UNMARK check upon creation/destruction
	//   therefore, it must be destroyed last since it is created first in 
	//   CIpuTestHarness
	iTest.Close();
	}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:39,代码来源:IpuTestHarness.cpp


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