Products Support Documentation Download
rdmtimeapi.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_timeFromString RDM_T_FUNC (rdm_timeFromString)
22 #define rdm_timeToString RDM_T_FUNC (rdm_timeToString)
23 #define rdm_timeNowAsString RDM_T_FUNC (rdm_timeNowAsString)
24 #endif
25 
35 #if defined(__cplusplus)
36 extern "C" {
37 #endif
38 
47 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timeFromString (
48  const RDM_TCHAR_T *str,
49  RDM_PACKED_TIME_T *ptm
51 );
52 
59 RDM_EXPORT uint16_t EXTERNAL_FCN rdm_timeHour (
61 );
62 
69 RDM_EXPORT uint16_t EXTERNAL_FCN rdm_timeMinute (
71 );
72 
79 RDM_EXPORT uint16_t EXTERNAL_FCN rdm_timeSecond (
81 );
82 
89 RDM_EXPORT uint16_t EXTERNAL_FCN rdm_timeFraction (
91 );
92 
101 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timeToString (
102  RDM_PACKED_TIME_T timeVal,
103  RDM_TIME_FORMAT time_fmt,
104  RDM_TCHAR_T *buf,
105  size_t bufSize,
106  size_t *puSize
107 );
108 
115 RDM_EXPORT RDM_PACKED_TIME_T EXTERNAL_FCN rdm_timeZero (void);
116 
124 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timeNow (
125  int16_t time_zone,
126  RDM_PACKED_TIME_T *ptm
128 );
129 
138 RDM_EXPORT RDM_RETCODE EXTERNAL_FCN rdm_timeNowAsString (
139  int16_t time_zone,
140  RDM_TCHAR_T *timebuf,
141  size_t buflen
142 );
143 
144 #if defined(__cplusplus)
145 }
146 #endif
147 
RDM_RETCODE rdm_timeToString(RDM_PACKED_TIME_T timeVal, RDM_TIME_FORMAT time_fmt, RDM_TCHAR_T *buf, size_t bufSize, size_t *puSize)
Convert a time to a string.
RDM_RETCODE rdm_timeNowAsString(int16_t time_zone, RDM_TCHAR_T *timebuf, size_t buflen)
Get current local time as a string.
uint32_t RDM_PACKED_TIME_T
The RDM packed Time data structure.
RDM Status and Error Return Codes.
RDM_RETCODE rdm_timeNow(int16_t time_zone, RDM_PACKED_TIME_T *ptm)
Get the current local time.
RDM_PACKED_TIME_T rdm_timeZero(void)
Get the local time at the start of a day.
uint16_t rdm_timeSecond(RDM_PACKED_TIME_T tm)
Get the second of the minute.
RDM_RETCODE rdm_timeFromString(const RDM_TCHAR_T *str, RDM_PACKED_TIME_T *ptm)
Convert a string to local time.
RDM_RETCODE
RDM status and error return codes.
uint16_t rdm_timeFraction(RDM_PACKED_TIME_T tm)
Get the fractions of the second.
uint16_t rdm_timeHour(RDM_PACKED_TIME_T tm)
Get the hour of the day.
uint16_t rdm_timeMinute(RDM_PACKED_TIME_T tm)
Get the minute of the hour.
Header for the public Date/Time types.
#define RDM_TCHAR_T
Definition: psptypes.h:134
RDM_TIME_FORMAT
RDM time format codes.