Products Support Documentation Download
rdmtimetzapi.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(RDMTIMETZAPI_H_INCLUDE_)
18 #define RDMTIMETZAPI_H_INCLUDE_
19 
20 #if defined(__cplusplus) && !defined(CPP_HEADER_INCLUDED)
21 #error rdmtimetzapi.h is only for C applications. Do not include it directly in C++ applications. Use cpp-rdmtimetzapi.h instead
22 #endif
23 
24 #include "rdmdatetimetypes.h"
25 #include "rdmretcodetypes.h"
26 
27 #if !defined(RDM_NO_UNICODE)
28 #define rdm_timetzNowAsString RDM_T_FUNC(rdm_timetzNowAsString)
29 #define rdm_timetzFromString RDM_T_FUNC(rdm_timetzFromString)
30 #define rdm_timetzToString RDM_T_FUNC(rdm_timetzToString)
31 #endif
32 
33 
48 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzNowAsString (
49  int16_t time_zone,
50  RDM_TCHAR_T *timebuf,
51  size_t buflen)
52 ;
53 
62 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzFromString (
63  const RDM_TCHAR_T *str,
64  RDM_PACKED_TIMETZ_T *ptz)
65 ;
66 
74 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzNow (
75  int16_t time_zone,
76  RDM_PACKED_TIMETZ_T *ptz)
77 ;
78 
85 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzToTime (
86  RDM_PACKED_TIMETZ_T timetzVal,
87  int16_t tz_disp,
88  RDM_PACKED_TIME_T *pTimeVal)
89 ;
90 
99 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzToString (
100  RDM_PACKED_TIMETZ_T timetzVal,
101  RDM_TIME_FORMAT time_fmt,
102  RDM_TCHAR_T *buf,
103  size_t bufSize,
104  size_t *puSize)
105 ;
106 
113 RDM_EXPORT RDM_PACKED_TIMETZ_T EXTERNAL_FCN rdm_timetzZero (
114  void)
115 ;
116 
119 #endif /* RDMTIMETZAPI_H_INCLUDE_ */
RDM_RETCODE rdm_timetzToString(RDM_PACKED_TIMETZ_T timetzVal, RDM_TIME_FORMAT time_fmt, RDM_TCHAR_T *buf, size_t bufSize, size_t *puSize)
Convert a time with timezone to a string.
RDM_RETCODE rdm_timetzNowAsString(int16_t time_zone, RDM_TCHAR_T *timebuf, size_t buflen)
Get current time with timezone as a string.
uint32_t RDM_PACKED_TIME_T
The RDM packed Time data structure.
RDM Status and Error Return Codes.
RDM_RETCODE rdm_timetzNow(int16_t time_zone, RDM_PACKED_TIMETZ_T *ptz)
Get the current time with timezone.
RDM_RETCODE
RDM status and error return codes.
The RDM packed Time with time zone data structure.
RDM_RETCODE rdm_timetzFromString(const RDM_TCHAR_T *str, RDM_PACKED_TIMETZ_T *ptz)
Convert a string to a time.
RDM_PACKED_TIMETZ_T rdm_timetzZero(void)
Get the time at the start of a day.
Header for the public Date/Time types.
#define RDM_TCHAR_T
Definition: psptypes.h:134
RDM_RETCODE rdm_timetzToTime(RDM_PACKED_TIMETZ_T timetzVal, int16_t tz_disp, RDM_PACKED_TIME_T *pTimeVal)
Convert a time with timezone to local time.
RDM_TIME_FORMAT
RDM time format codes.