prg_date_range_to_string_convert_tz()

Abstract

Converts PrgT start and end date objects to a date range string for a given time zone.

Syntax

prg_date_range_to_string_convert_tz (start_date_time, end_date_time, time_zone, string_format, options, date_time_string, buffer_len)
Argument Type Description
start_date_time PrgT_Date Start date object to convert.
end_date_time PrgT_Date End date object to convert.
time_zone PrgT_Timezone_Name Time zone to which to convert
string_format PrgT_Date_String_Format Desired string format (see Details).
options int Conversion options (see Details).
date_time_range_string char * Buffer to hold converted string.
buffer_len int * Size of date_time_string buffer.
If date_time_string is too small to hold the converted string, this value is set to the required size and PrgC_Compcode_Failure is returned.

Return Type

PrgT_Compcode

PrgC_Compcode_Failure if inputs are not valid or buffer size is not sufficient; PrgC_Compcode_Success otherwise.

prg_date.h

Details

This function converts two PrgT_Date objects to string representation as a date range. Any information that is common to both dates is not repeated in the date range string. For example:

  • Start Date: 11:37:44.000 Dec 23 2011
  • End Date: 12:37:44.000 Dec 23 2011
  • Date Range String: 11:37:44.000 - 12:37:44.000 Dec 23 2011 (EST)

date_time is assumed to be the computer’s local time unless specified otherwise by options. The returned string represents the date and time converted to the specified time zone.

string_format specifies the desired format of the string. This must be PrgC_Date_String_Format_Standard, which produces 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