prg_date_from_string_convert_tz()

Abstract

Converts the string representation of a date in a given time zone to PrgT_Date.

Syntax

prg_date_from_string_convert_tz (date_time_string, time_zone, string_format, options, date_time_ptr)
Argument Type Description
date_time_string const char * Date string to convert (must not be empty).
time_zone PrgT_Timezone_Name Time zone used by date_time_string; one of the symbolic constants given in Table 1.
string_format PrgT_Date_String_Format Format of date_time_string (see Details).
options int Conversion options (see Details).
date_time_ptr PrgT_Date * Object to receive converted date (must not be NULL).

Return Type

PrgT_Compcode

PrgC_Compcode_Success if the conversion is successful; PrgC_Compcode_Failure otherwise.

prg_date.h

Details

This function converts a string representation of a date to a PrgT_Date object.

date_time_string is in the specified time_zone. The returned PrgT_Date object represents the date and time converted to the computer’s local time (unless specified otherwise by options).

string_format specifies the format of the string. This must be PrgC_Date_String_Format_Standard, which specifies a string in the C standard format: “12:34:56.789 Mar 19 2008”.

options must be either 0 or one of the following symbolic constants:

  • PRGC_DATE_OPT_USE_TIMEZONE_PREF—convert to the time zone specified by the timezone preference
  • PRGC_DATE_OPT_INCLUDE_TIMEZONE_STR—include the time zone in the returned string
  • PRGC_DATE_OPT_INCLUDE_TIMEZONE_STR_USE_PREF—convert to the time zone specified by the timezone preference and include the time zone in the returned string

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com