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 ;
50 
59 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzFromString (
60  const RDM_TCHAR_T *str,
61  RDM_DATE_FORMAT date_fmt,
63  )
64 ;
65 
75 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzNow (
76  int16_t time_zone,
78  )
79 ;
80 
91 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzNowAsString (
92  int16_t time_zone,
93  RDM_TCHAR_T *tszbuf,
94  size_t buflen
95  )
96 ;
97 
105 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzToTimestamp (
106  RDM_PACKED_TIMESTAMPTZ_T tstzVal,
107  int16_t tz_disp,
108  RDM_PACKED_TIMESTAMP_T *pTsVal
109  )
110 ;
111 
121 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timestamptzToString (
122  RDM_PACKED_TIMESTAMPTZ_T tszVal,
123  RDM_DATE_FORMAT date_format,
124  RDM_TCHAR_T date_sep,
125  RDM_TIME_FORMAT time_format,
126  RDM_TCHAR_T *buf,
127  size_t bufSize,
128  size_t *puSize
129  )
130 ;
131 
138 RDM_EXPORT RDM_PACKED_TIMESTAMPTZ_T EXTERNAL_FCN rdm_timestamptzZero (
139  void)
140 ;
141 
144 #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.