1

Is there any possibility to determine is Daylight Saving Time (DST) now in Tizen Native Application (pure C) for wearable device (Gear S2/S3), because after:

time_t rawtime;
time(&rawtime);

struct tm *tm_local;
tm_local = localtime(&rawtime);

field tm_local->tm_isdst is always 0 (even for DST dates).

Andrii Omelchenko
  • 13,183
  • 12
  • 43
  • 79
  • 1
    Can you use [Tizen's i18n `Timezone` module](https://developer.tizen.org/development/api-references/native-application?redirect=https://developer.tizen.org/dev-guide/4.0.0/org.tizen.native.wearable.apireference/group__CAPI__BASE__UTILS__I18N__TIMEZONE__MODULE.html)? – Matt Johnson-Pint Dec 04 '17 at 18:35
  • @MattJohnson Tizen's i18n Timezone module (`i18n_timezone_get_dst_savings()`) did the trick! Please convert your useful comment into answer. – Andrii Omelchenko Dec 04 '17 at 19:32
  • @MattJohnson Will `i18n_timezone_get_dst_savings()` returns `0` for non DST dates? Or it returns offset constantly for timezone and not depend on current date? – Andrii Omelchenko Dec 04 '17 at 19:42
  • I don't use this platform at all. I just found the docs. I think you want to use `18n_timezone_get_offset_with_date`, passing in `i18n_timezone_create_default()` for the time zone parameter. Feel free to supply your own answer, I don't need the points. ;) – Matt Johnson-Pint Dec 04 '17 at 19:51

0 Answers0