Products Support Documentation Download
rdmtimestamptzapi.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * Raima Database Manager
3  *
4  * Copyright (c) 2010 Raima Inc., All rights reserved.
5  *
6  * Use of this software, whether in source code format, or in executable,
7  * binary object code form, is governed by the Raima LICENSE which
8  * is fully described in the LICENSE.TXT file, included within this
9  * distribution of files.
10  * ----------------------------------------------------------------------------
11  */
12 
17 #include "rdmdatetimetypes.h"
18 #include "rdmretcodetypes.h"
19 
20 #if defined(RDM_UNICODE)
21 #define rdm_timestamptzFromString RDM_T_FUNC (rdm_timestamptzFromString)
22 #define rdm_timestamptzNowAsString RDM_T_FUNC (rdm_timestamptzNowAsString)
23 #define rdm_timestamptzToString RDM_T_FUNC (rdm_timestamptzToString)
24 #endif
25 
30 #if defined(__cplusplus)
31 extern "C" {
32 #endif
33 
41 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzFromTimestamp (
43  int16_t tz,
45  *pTszVal
46 );
47 
56 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzFromString (
57  const RDM_TCHAR_T *str,
58  RDM_DATE_FORMAT date_fmt,
60 );
61 
71 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzNow (
72  int16_t time_zone,
74 );
75 
86 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzNowAsString (
87  int16_t time_zone,
88  RDM_TCHAR_T *tszbuf,
89  size_t buflen
90 );
91 
99 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzToTimestamp (
100  RDM_PACKED_TIMESTAMPTZ_T tstzVal,
101  int16_t tz_disp,
102  RDM_PACKED_TIMESTAMP_T *pTsVal
103 );
104 
114 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzToString (
115  RDM_PACKED_TIMESTAMPTZ_T tszVal,
116  RDM_DATE_FORMAT date_format,
117  RDM_TCHAR_T date_sep,
118  RDM_TIME_FORMAT time_format,
119  RDM_TCHAR_T *buf,
120  size_t bufSize,
121  size_t *puSize
122 );
123 
130 RDM_EXPORT RDM_PACKED_TIMESTAMPTZ_T EXTERNAL_FCN rdm_timestamptzZero (void);
131 
132 #if defined(__cplusplus)
133 }
134 #endif
135 
RDM_RETCODE rdm_timestamptzFromTimestamp(RDM_PACKED_TIMESTAMP_T tsVal, int16_t tz, RDM_PACKED_TIMESTAMPTZ_T *pTszVal)
Convert a local timestamp to timestamp with timezone.
RDM_RETCODE rdm_timestamptzNow(int16_t time_zone, RDM_PACKED_TIMESTAMPTZ_T *tsz)
Get the current timestamp with timezone.
RDM_DATE_FORMAT
RDM Date format codes.
RDM_RETCODE rdm_timestamptzToTimestamp(RDM_PACKED_TIMESTAMPTZ_T tstzVal, int16_t tz_disp, RDM_PACKED_TIMESTAMP_T *pTsVal)
Convert a timestamp with timezone to a string.
RDM Status and Error Return Codes.
RDM_RETCODE rdm_timestamptzFromString(const RDM_TCHAR_T *str, RDM_DATE_FORMAT date_fmt, RDM_PACKED_TIMESTAMPTZ_T *ptsz)
Convert from a string to a timestamp with timezone.
The RDM packed Timestamp with time zone data structure.
RDM_RETCODE
RDM status and error return codes.
RDM_RETCODE rdm_timestamptzToString(RDM_PACKED_TIMESTAMPTZ_T tszVal, RDM_DATE_FORMAT date_format, RDM_TCHAR_T date_sep, RDM_TIME_FORMAT time_format, RDM_TCHAR_T *buf, size_t bufSize, size_t *puSize)
Convert a timestamp with timezone to a string.
RDM_PACKED_TIMESTAMPTZ_T rdm_timestamptzZero(void)
Get the timestamp of the epoch.
The RDM packed Timestamp data structure.
RDM_RETCODE rdm_timestamptzNowAsString(int16_t time_zone, RDM_TCHAR_T *tszbuf, size_t buflen)
Get the current timestamp with timezone as string.
Header for the public Date/Time types.
#define RDM_TCHAR_T
Definition: psptypes.h:130
RDM_TIME_FORMAT
RDM time format codes.