1 /* |
1 /* |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
154 if ( IsToday( homeTime ) ) |
151 if ( IsToday( homeTime ) ) |
155 { |
152 { |
156 FLOG( "[OMADM] TUtil::SyncTimeLC time" ); |
153 FLOG( "[OMADM] TUtil::SyncTimeLC time" ); |
157 |
154 |
158 TBuf<KBufSize> timeFormat; |
155 TBuf<KBufSize> timeFormat; |
159 HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO ); |
156 /*HBufC* buf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO ); |
160 TUtil::StrCopy( timeFormat, *buf ); |
157 TUtil::StrCopy( timeFormat, *buf ); |
161 CleanupStack::PopAndDestroy( buf ); |
158 CleanupStack::PopAndDestroy( buf ); |
162 homeTime.FormatL( ptr, timeFormat ); |
159 homeTime.FormatL( ptr, timeFormat );*/ |
163 |
160 |
164 FLOG( "[OMADM] TUtil::SyncTimeLC time done" ); |
161 FLOG( "[OMADM] TUtil::SyncTimeLC time done" ); |
165 } |
162 } |
166 else |
163 else |
167 { |
164 { |
168 FLOG( "[OMADM] TUtil::SyncTimeLC date" ); |
165 FLOG( "[OMADM] TUtil::SyncTimeLC date" ); |
169 |
166 |
170 TBuf<KBufSize> dateFormat; |
167 TBuf<KBufSize> dateFormat; |
171 HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO ); |
168 /*HBufC* buf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO ); |
172 TUtil::StrCopy( dateFormat, *buf ); |
169 TUtil::StrCopy( dateFormat, *buf ); |
173 CleanupStack::PopAndDestroy( buf ); |
170 CleanupStack::PopAndDestroy( buf ); |
174 homeTime.FormatL(ptr, dateFormat); |
171 homeTime.FormatL(ptr, dateFormat);*/ |
175 |
172 |
176 FLOG( "[OMADM] TUtil::SyncTimeLC date done" ); |
173 FLOG( "[OMADM] TUtil::SyncTimeLC date done" ); |
177 } |
174 } |
178 FLOG( "[OMADM] TUtil::SyncTimeLC Done" ); |
175 FLOG( "[OMADM] TUtil::SyncTimeLC Done" ); |
179 return hBuf; |
176 return hBuf; |
236 |
233 |
237 // ----------------------------------------------------------------------------- |
234 // ----------------------------------------------------------------------------- |
238 // TUtil::GetDateTextL |
235 // TUtil::GetDateTextL |
239 // ----------------------------------------------------------------------------- |
236 // ----------------------------------------------------------------------------- |
240 // |
237 // |
241 void TUtil::GetDateTextL(TDes& aText, TTime aDateTime) |
238 void TUtil::GetDateTextL(TDes& /*aText*/, TTime aDateTime) |
242 { |
239 { |
243 TTime homeTime = ConvertUniversalToHomeTime( aDateTime ); |
240 TTime homeTime = ConvertUniversalToHomeTime( aDateTime ); |
244 HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO ); |
241 //HBufC* hBuf = StringLoader::LoadLC( R_QTN_DATE_USUAL_WITH_ZERO ); |
245 homeTime.FormatL( aText, *hBuf ); |
242 //homeTime.FormatL( aText, *hBuf ); |
246 CleanupStack::PopAndDestroy( hBuf ); |
243 //CleanupStack::PopAndDestroy( hBuf ); |
247 } |
244 } |
248 |
245 |
249 |
246 |
250 // ----------------------------------------------------------------------------- |
247 // ----------------------------------------------------------------------------- |
251 // TUtil::GetTimeTextL |
248 // TUtil::GetTimeTextL |
252 // ----------------------------------------------------------------------------- |
249 // ----------------------------------------------------------------------------- |
253 // |
250 // |
254 void TUtil::GetTimeTextL( TDes& aText, TTime aDateTime ) |
251 void TUtil::GetTimeTextL( TDes& /*aText*/, TTime aDateTime ) |
255 { |
252 { |
256 TTime homeTime = ConvertUniversalToHomeTime( aDateTime ); |
253 TTime homeTime = ConvertUniversalToHomeTime( aDateTime ); |
257 HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO ); |
254 //HBufC* hBuf = StringLoader::LoadLC( R_QTN_TIME_USUAL_WITH_ZERO ); |
258 homeTime.FormatL( aText, *hBuf ); |
255 //homeTime.FormatL( aText, *hBuf ); |
259 CleanupStack::PopAndDestroy( hBuf ); |
256 //CleanupStack::PopAndDestroy( hBuf ); |
260 } |
257 } |
261 |
258 |
262 |
259 |
263 // ----------------------------------------------------------------------------- |
260 // ----------------------------------------------------------------------------- |
264 // TUtil::GetDateTimeTextL |
261 // TUtil::GetDateTimeTextL |