23 #if defined (HAVE_CONFIG_H)
45 : ot_unix_time (static_cast<time_t> (d)), ot_usec (0)
48 ot_usec =
static_cast<int> (std::modf (d, &ip) * 1e6);
52 : ot_unix_time (), ot_usec ()
58 t.tm_hour = tm.
hour ();
59 t.tm_mday = tm.
mday ();
61 t.tm_year = tm.
year ();
62 t.tm_wday = tm.
wday ();
63 t.tm_yday = tm.
yday ();
64 t.tm_isdst = tm.
isdst ();
66 #if defined (HAVE_TM_GMTOFF)
67 t.tm_gmtoff = tm.
gmtoff ();
70 #if defined (HAVE_STRUCT_TM_TM_ZONE)
72 char *ps =
strsave (s.c_str ());
78 #if defined (HAVE_STRUCT_TM_TM_ZONE)
110 #define DEFINE_SET_FIELD_FCN(type, f, lo, hi) \
112 base_tm::f (type v) \
119 #define DEFINE_SET_INT_FIELD_FCN(f, lo, hi) \
120 DEFINE_SET_FIELD_FCN (int, f, lo, hi)
142 #if ! defined STRFTIME_BUF_INITIAL_SIZE
143 # define STRFTIME_BUF_INITIAL_SIZE 128
165 #if defined (HAVE_TM_GMTOFF)
169 #if defined (HAVE_STRUCT_TM_TM_ZONE)
174 const char *fmt_str = fmt.c_str ();
178 size_t chars_written = 0;
180 while (chars_written == 0)
183 buf =
new char [bufsize];
192 #if defined (HAVE_STRUCT_TM_TM_ZONE)
210 struct ::tm *
t =
static_cast<struct ::tm*
> (
p);
222 #if defined (HAVE_TM_GMTOFF)
226 #if defined (HAVE_STRUCT_TM_TM_ZONE)
229 #elif defined (HAVE_TZNAME)
230 if (t->tm_isdst == 0 || t->tm_isdst == 1)
231 m_zone = tzname[t->tm_isdst];
270 #if defined (HAVE_TM_GMTOFF)
274 #if defined (HAVE_STRUCT_TM_TM_ZONE)
279 const char *
p = str.c_str ();
285 if (t.tm_mday != 0 && t.tm_mon >= 0
305 #if defined (HAVE_STRUCT_TM_TM_ZONE)
319 time_t usr_sec, sys_sec;
320 long usr_usec, sys_usec;
for fields that display a single padding can be changed or inhibited by following the hour(hh:mm:ss[AP]M).tem%R Time
Octave interface to the compression and uncompression libraries.
time_t unix_time(void) const
#define DEFINE_SET_INT_FIELD_FCN(f, lo, hi)
create a structure array and initialize its values The dimensions of each cell array of values must match Singleton cells and non cell values are repeated so that they fill the entire array If the cells are create an empty structure array with the specified field names If the argument is an return the underlying struct Observe that the syntax is optimized for struct trong struct("foo", 1) esult
std::string asctime(void) const
void init(const time &ot)
static char * strsave(const char *s)
OCTAVE_EXPORT octave_value_list return the number of command line arguments passed to Octave If called with the optional argument the function t
int octave_getrusage_wrapper(time_t *usr_sec, time_t *sys_sec, long *usr_usec, long *sys_usec, long *maxrss, long *ixrss, long *idrss, long *isrss, long *minflt, long *majflt, long *nswap, long *inblock, long *oublock, long *msgsnd, long *msgrcv, long *nsignals, long *nvcsw, long *nivcsw)
int octave_gettimeofday_wrapper(time_t *sec, long *usec)
size_t octave_strftime_wrapper(char *buf, size_t len, const char *fmt, const struct tm *t, struct tm_zone *tz, int ns)
F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_REAL const F77_REAL F77_REAL &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T F77_DBLE &F77_RET_T F77_REAL &F77_RET_T F77_REAL &F77_RET_T F77_DBLE &F77_RET_T const F77_DBLE F77_DBLE &F77_RET_T const F77_REAL F77_REAL &F77_RET_T F77_REAL F77_REAL &F77_RET_T F77_DBLE F77_DBLE &F77_RET_T const F77_DBLE const F77_DBLE F77_DBLE * d
time_t octave_mktime_wrapper(struct tm *tp)
int octave_cpu_time(time_t *usr_sec, time_t *sys_sec, long *usr_usec, long *sys_usec)
char * octave_strptime_wrapper(const char *p, const char *fmt, struct tm *t)
void init(const std::string &str, const std::string &fmt)
std::string zone(void) const
charNDArray max(char d, const charNDArray &m)
#define DEFINE_SET_FIELD_FCN(type, f, lo, hi)
#define STRFTIME_BUF_INITIAL_SIZE
If this string is the system will ring the terminal sometimes it is useful to be able to print the original representation of the string
void init(const time &ot)
std::string ctime(void) const
std::string strftime(const std::string &fmt) const
charNDArray min(char d, const charNDArray &m)