Languages

Menu
Sites
Language
SystemTime::GetCurrentTime problems?

Hi There,

This is my phone settings for time/date:

Now if I run this code:

    DateTime time;
    SystemTime::GetCurrentTime(TIME_MODE_WALL, time);
    AppLog("%S", time.ToString().GetPointer());
    SystemTime::GetCurrentTime(TIME_MODE_STANDARD, time);
    AppLog("%S", time.ToString().GetPointer());
    SystemTime::GetCurrentTime(TIME_MODE_UTC, time);
    AppLog("%S", time.ToString().GetPointer());

I have to following output:

virtual void testForm::OnActionPerformed(const Tizen::Ui::Control &, int)(78) > 06/13/2013 19:38:43
virtual void testForm::OnActionPerformed(const Tizen::Ui::Control &, int)(80) > 06/13/2013 19:38:43
virtual void testForm::OnActionPerformed(const Tizen::Ui::Control &, int)(82) > 06/13/2013 18:38:43
 

So it seems the TIME_MODE_WALL does not return the wall time, as if you see, it was 20:38, and not 19:38.
Or maybe I misunderstand something?

Thanks,
   Zoli

Edited by: Brock Boland on 17 Mar, 2014 Reason: Paragraph tags added automatically from tizen_format_fix module.

Responses

6 Replies
Pushpa G
I could not observe this issue for Kolkata time zone but yes could observe this issue in Amsterdam timezone
Zoltan Puski
Hmm, do you have over there summer/winter daylight saving? Maybe that 1 hour confuses it? However, this is anyway not good I think, wall-time has to be the current phone display time. Especially this time is required for some API calls, like ConditionalLaunch, and that does not work now.
Zoltan Puski
The following code results: Locale systemLocale = localeManager.GetSystemLocale(); String countryCodeString = systemLocale.GetCountryCodeString(); String languageCodeString = systemLocale.GetLanguageCodeString(); String variantCodString = systemLocale.GetVariantCodeString(); AppLog("countryCodeString=%S languageCodeString=%S variantCodString=%S", countryCodeString.GetPointer(), languageCodeString.GetPointer(), variantCodString.GetPointer()); TimeZone tz= localeManager.GetSystemTimeZone(); AppLog("GetDstSavings=%d GetId=%S IsDstUsed=%d GetRawOffset=%d", tz.GetDstSavings(), tz.GetId().GetPointer(), tz.IsDstUsed(), tz.GetRawOffset()); -------------- > countryCodeString=NL languageCodeString=nld variantCodString= > GetDstSavings=60 GetId=Europe/Amsterdam IsDstUsed=0 GetRawOffset=60 I think the problem is the ***** IsDstUsed=0 ***** As DST is used here, also the phone indicator shows the correct time (including DST), but SystemTime::GetCurrentTime(WALL_TIME) and TimeZone.IsDstUsed() ignores it.
Zoltan Puski
Also, calling: tz.GetDstStartingRule() ------> returns NULL from help: returns null pointer if the DST start rule is undefined tz.GetDstStartingYear() ------> returns 0 So it seems for API calls the DST handling is buggy. I have the latest(?) 2.1 (with WIFI,etc)
tizendevteam T
Dear Zoltan, We wish to inform that this issue is fixed in the nearest future version Thanks,
Zoltan Puski
Thanks guys!