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 #if !defined(RDMTIMEZONETZAPI_H_INCLUDED_)
18 #define RDMTIMEZONETZAPI_H_INCLUDED_
19 
20 #if defined(__cplusplus) && !defined(CPP_HEADER_INCLUDED)
21 #error rdmtimestamptzapi.h is only for C applications. Do not include it directly in C++ applications. Use cpp-rdmtimestamptzapi.h instead
22 #endif
23 
24 #include "rdmdatetimetypes.h"
25 #include "rdmretcodetypes.h"
26 
27 #if !defined(RDM_NO_UNICODE)
28 #define rdm_timestamptzFromString RDM_T_FUNC(rdm_timestamptzFromString)
29 #define rdm_timestamptzNowAsString RDM_T_FUNC(rdm_timestamptzNowAsString)
30 #define rdm_timestamptzToString RDM_T_FUNC(rdm_timestamptzToString)
31 #endif
32 
44 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzFromTimestamp (
46  int16_t tz,
47  RDM_PACKED_TIMESTAMPTZ_T *pTszVal)
48 ;
49 
58 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzFromString (
59  const RDM_TCHAR_T *str,
60  RDM_DATE_FORMAT date_fmt,
62 ;
63 
73 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzNow (
74  int16_t time_zone,
76 ;
77 
88 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzNowAsString (
89  int16_t time_zone,
90  RDM_TCHAR_T *tszbuf,
91  size_t buflen)
92 ;
93 
101 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzToTimestamp (
102  RDM_PACKED_TIMESTAMPTZ_T tstzVal,
103  int16_t tz_disp,
104  RDM_PACKED_TIMESTAMP_T *pTsVal)
105 ;
106 
116 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzToString (
117  RDM_PACKED_TIMESTAMPTZ_T tszVal,
118  RDM_DATE_FORMAT date_format,
119  RDM_TCHAR_T date_sep,
120  RDM_TIME_FORMAT time_format,
121  RDM_TCHAR_T *buf,
122  size_t bufSize,
123  size_t *puSize)
124 ;
125 
132 RDM_EXPORT RDM_PACKED_TIMESTAMPTZ_T EXTERNAL_FCN rdm_timestamptzZero (
133  void)
134 ;
135 
138 #endif /* RDMTIMEZONETZAPI_H_INCLUDED_ */
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:134
RDM_TIME_FORMAT
RDM time format codes.