QOF  0.8.7
Macros

64bit UTC Time handling routines More...

#include "config.h"
#include <time.h>

Go to the source code of this file.

Macros

#define QOF_MOD_TIME   "qof-time"
 
#define QOF_NSECS   1000000000
 

Functions

QofTime manipulation
gboolean qof_time_equal (const QofTime *ta, const QofTime *tb)
 
gint qof_time_cmp (const QofTime *ta, const QofTime *tb)
 
QofTimeqof_time_diff (const QofTime *ta, const QofTime *tb)
 difference between two QofTimes. More...
 
QofTimeqof_time_abs (QofTime *t)
 
gboolean qof_time_is_valid (const QofTime *qt)
 
QofTimeqof_time_from_time_t (time_t t, glong nanosecs)
 
QofTimeqof_time_set (QofTimeSecs t, glong nanosecs)
 
gboolean qof_time_to_time_t (QofTime *ts, time_t *t, glong *nanosecs)
 
QofTimeqof_time_from_tm (struct tm *tm, glong nanosecs)
 Convert a broken-down into a QofTime. More...
 
gboolean qof_time_to_gtimeval (QofTime *qt, GTimeVal *gtv)
 Convert a QofTime to a GTimeVal. More...
 
void qof_time_from_gtimeval (QofTime *qt, GTimeVal *gtv)
 Convert a QofTime to a GTimeVal. More...
 
QofTimeqof_time_dmy_to_time (guint8 day, guint8 month, guint16 year)
 
gboolean qof_time_to_dmy (QofTime *t, guint8 *day, guint8 *month, guint16 *year)
 
GDate * qof_time_to_gdate (QofTime *time)
 Convert QofTime to GDate. More...
 
QofTimeqof_time_from_gdate (GDate *date)
 Convert a GDate to a QofTime. More...
 
Time Start/End Adjustment routines

Given a time value, adjust it to be the beginning or end of that day.

GTimeVal * qof_time_get_current_start (void)
 
QofTimeqof_time_get_current (void)
 Get the current QofTime. More...
 
gboolean qof_time_set_day_middle (QofTime *t)
 set the given QofTime to midday on the same day. More...
 
gboolean qof_time_set_day_start (QofTime *time)
 set the given QofTime to the first second of that day. More...
 
gboolean qof_time_set_day_end (QofTime *time)
 set the given QofTime to the last second of that day. More...
 
guint8 qof_time_last_mday (QofTime *ts)
 
Today's Date
QofTimeqof_time_get_today_start (void)
 
QofTimeqof_time_get_today_end (void)
 
gchar * qof_time_stamp_now (void)
 

QofTime functions.

typedef struct QofTime64 QofTime
 Use a 64-bit signed int QofTime. More...
 
typedef gint64 QofTimeSecs
 Replacement for time_t. More...
 
void qof_time_add_secs (QofTime *qt, QofTimeSecs secs)
 Add (or subtract) seconds from a QofTime. More...
 
QofTimeqof_time_add_secs_copy (QofTime *qt, QofTimeSecs secs)
 Create a new QofTime, secs different to an original. More...
 
QofTimeqof_time_new (void)
 create an empty QofTime More...
 
QofTimeqof_time_copy (const QofTime *qt)
 Create a copy of a QofTime. More...
 
void qof_time_free (QofTime *qt)
 Free a QofTime when no longer required.
 
void qof_time_set_secs (QofTime *time, QofTimeSecs secs)
 Set the number of seconds. More...
 
void qof_time_set_nanosecs (QofTime *time, glong nano)
 Set the number of seconds. More...
 
QofTimeSecs qof_time_get_secs (const QofTime *time)
 Get the number of seconds. More...
 
glong qof_time_get_nanosecs (const QofTime *time)
 Get the number of seconds. More...
 

Detailed Description

64bit UTC Time handling routines

Author
Copyright 2006 Neil Williams linux.nosp@m.@cod.nosp@m.ehelp.nosp@m..co..nosp@m.uk

Definition in file qoftime.h.