int i18n_timezone_set_raw_offset(i18n_timezone_h timezone, int32_t offset_milliseconds);
/**
- * @brief Gets the region code associated with the given system time zone ID.
- * @details The region code is either ISO 3166 2-letter country code or UN M.49 3-digit area code. When the time zone is not associated with a specific location, for example - "Etc/UTC", "EST5EDT", then this method returns "001" (UN M.49 area code for World).
+ * @brief Gets the i18n_timezone_h's raw GMT offset (i.e., the number of milliseconds
+ * to add to GMT to get local time, before taking daylight savings time into account).
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] timezone The i18n_timezone_h to get a raw offset.
i18n_ustring_copy_ua(_tzid, tzid);
// gets length of '_tzid'
- i18n_ustring_get_length(_tzid, &len);
+ len = i18n_ustring_get_length(_tzid);
// creates i18n_ucalendar_h
ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal);
if (ret) {
* @brief Creates a new #i18n_udate_format_h for formatting and parsing dates and times.
* @details A #i18n_udate_format_h may be used to format dates in calls to {@link i18n_udate_create()}.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks Must release @a format using i18n_udate_destroy().
+ * @remarks Must release @a format using i18n_udate_destroy().\n
+ * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n
+ * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style.
*
* @param[in] time_style The style used to format times\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG,
- * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, or #I18N_UDATE_NONE (relative time styles
+ * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE (relative time styles
* are not currently supported).
* @param[in] date_style The style used to format dates\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG,
* #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_RELATIVE, #I18N_UDATE_LONG_RELATIVE,
- * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN, or #I18N_UDATE_NONE
+ * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE
* @param[in] locale The locale specifying the formatting conventions.
* @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone.
* @param[in] tz_id_len The length of @a tz_id, otherwise @c -1 if NULL-terminated.
- * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.
- * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.
+ * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.\n
+ * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n
+ * See remarks for additional conditions.
* @param[in] pattern_len The number of characters in the pattern, or otherwise @c -1 if NULL-terminated.
* @param[out] format A pointer to an #i18n_udate_format_h to use for formatting dates and times, otherwise @c 0 if an error occurs.
*
int i18n_timezone_set_raw_offset(i18n_timezone_h timezone, int32_t offset_milliseconds);
/**
- * @brief Gets the region code associated with the given system time zone ID.
- * @details The region code is either ISO 3166 2-letter country code or UN M.49 3-digit area code. When the time zone is not associated with a specific location, for example - "Etc/UTC", "EST5EDT", then this method returns "001" (UN M.49 area code for World).
+ * @brief Gets the i18n_timezone_h's raw GMT offset (i.e., the number of milliseconds
+ * to add to GMT to get local time, before taking daylight savings time into account).
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
* @param[in] timezone The i18n_timezone_h to get a raw offset.
i18n_ustring_copy_ua(_tzid, tzid);
// gets length of '_tzid'
- i18n_ustring_get_length(_tzid, &len);
+ len = i18n_ustring_get_length(_tzid);
// creates i18n_ucalendar_h
ret = i18n_ucalendar_create(_tzid, len, "en_US", I18N_UCALENDAR_TRADITIONAL, &ucal);
if (ret) {
* @brief Creates a new #i18n_udate_format_h for formatting and parsing dates and times.
* @details A #i18n_udate_format_h may be used to format dates in calls to {@link i18n_udate_create()}.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @remarks Must release @a format using i18n_udate_destroy().
+ * @remarks Must release @a format using i18n_udate_destroy().\n
+ * If @a pattern parameter is used, pass in #I18N_UDATE_PATTERN for @a time_style and @a date_style. \n
+ * #I18N_UDATE_PATTERN can only be used in this case, and has to be set for both @a time_style and @a date_style.
*
* @param[in] time_style The style used to format times\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG,
- * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, or #I18N_UDATE_NONE (relative time styles
+ * #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE (relative time styles
* are not currently supported).
* @param[in] date_style The style used to format dates\n One of #I18N_UDATE_FULL, #I18N_UDATE_LONG,
* #I18N_UDATE_MEDIUM, #I18N_UDATE_SHORT, #I18N_UDATE_DEFAULT, #I18N_UDATE_RELATIVE, #I18N_UDATE_LONG_RELATIVE,
- * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN, or #I18N_UDATE_NONE
+ * #I18N_UDATE_MEDIUM_RELATIVE, #I18N_UDATE_SHORT_RELATIVE, #I18N_UDATE_PATTERN (see remarks) or #I18N_UDATE_NONE
* @param[in] locale The locale specifying the formatting conventions.
* @param[in] tz_id A timezone ID specifying the timezone to use\n If @c 0, use the default timezone.
* @param[in] tz_id_len The length of @a tz_id, otherwise @c -1 if NULL-terminated.
- * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.
- * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.
+ * @param[in] pattern A pattern specifying the format to use. The pattern is generated by Udatepg module.\n
+ * When the pattern parameter is used, pass in #I18N_UDATE_PATTERN for both time_style and date_style.\n
+ * See remarks for additional conditions.
* @param[in] pattern_len The number of characters in the pattern, or otherwise @c -1 if NULL-terminated.
* @param[out] format A pointer to an #i18n_udate_format_h to use for formatting dates and times, otherwise @c 0 if an error occurs.
*
UErrorCode status = U_ZERO_ERROR;
*daylight_time = ((TimeZone*)timezone)->inDaylightTime(date, status);
- i18n_error_code_e i18n_error;
+ i18n_error_code_e i18n_error = I18N_ERROR_NONE;
ERR_MAPPING(status, i18n_error);
I18N_ERR(i18n_error);
- return _i18n_error_mapping(status);
-
+ return i18n_error;
}
int i18n_timezone_has_same_rule(i18n_timezone_h timezone, i18n_timezone_h other, i18n_ubool *same_rule)