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 #include "rdmdatetimetypes.h"
18 #include "rdmretcodetypes.h"
19 
20 #if defined(RDM_UNICODE)
21 #define rdm_timetzNowAsString RDM_T_FUNC (rdm_timetzNowAsString)
22 #define rdm_timetzFromString RDM_T_FUNC (rdm_timetzFromString)
23 #define rdm_timetzToString RDM_T_FUNC (rdm_timetzToString)
24 #endif
25 
30 #if defined(__cplusplus)
31 extern "C" {
32 #endif
33 
44 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzNowAsString (
45  int16_t time_zone,
46  RDM_TCHAR_T *timebuf,
47  size_t buflen
48 );
49 
58 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzFromString (
59  const RDM_TCHAR_T *str,
62 );
63 
71 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzNow (
72  int16_t time_zone,
74 );
75 
82 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzToTime (
83  RDM_PACKED_TIMETZ_T timetzVal,
84  int16_t tz_disp,
85  RDM_PACKED_TIME_T *pTimeVal
86 );
87 
96 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timetzToString (
97  RDM_PACKED_TIMETZ_T timetzVal,
98  RDM_TIME_FORMAT time_fmt,
99  RDM_TCHAR_T *buf,
100  size_t bufSize,
101  size_t *puSize
102 );
103 
110 RDM_EXPORT RDM_PACKED_TIMETZ_T EXTERNAL_FCN rdm_timetzZero (void);
111 
112 #if defined(__cplusplus)
113 }
114 #endif
115 
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.