syslog-ng source
unixtime.h File Reference
#include "timeutils/zoneinfo.h"
#include <stdint.h>
Include dependency graph for unixtime.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  UnixTime
 

Macros

#define UNIX_TIME_INIT   { -1, 0, -1 }
 

Functions

void unix_time_unset (UnixTime *ut)
 
void unix_time_set_now (UnixTime *self)
 
void unix_time_set_timezone (UnixTime *self, gint new_gmtoff)
 
void unix_time_set_timezone_with_tzinfo (UnixTime *self, TimeZoneInfo *tzinfo)
 
void unix_time_fix_timezone (UnixTime *self, gint new_gmtoff)
 
void unix_time_fix_timezone_with_tzinfo (UnixTime *self, TimeZoneInfo *tzinfo)
 
gboolean unix_time_fix_timezone_assuming_the_time_matches_real_time (UnixTime *self)
 
gboolean unix_time_eq (const UnixTime *a, const UnixTime *b)
 
gint64 unix_time_diff_in_seconds (const UnixTime *a, const UnixTime *b)
 
gint64 unix_time_diff_in_msec (const UnixTime *a, const UnixTime *b)
 
struct timeval timeval_from_unix_time (UnixTime *ut)
 
UnixTime unix_time_from_unix_epoch (guint64 unix_epoch)
 
guint64 unix_time_to_unix_epoch (const UnixTime ut)
 

Macro Definition Documentation

◆ UNIX_TIME_INIT

#define UNIX_TIME_INIT   { -1, 0, -1 }

Function Documentation

◆ timeval_from_unix_time()

struct timeval timeval_from_unix_time ( UnixTime *  ut)

◆ unix_time_diff_in_msec()

gint64 unix_time_diff_in_msec ( const UnixTime *  a,
const UnixTime *  b 
)

◆ unix_time_diff_in_seconds()

gint64 unix_time_diff_in_seconds ( const UnixTime *  a,
const UnixTime *  b 
)

◆ unix_time_eq()

gboolean unix_time_eq ( const UnixTime *  a,
const UnixTime *  b 
)

◆ unix_time_fix_timezone()

void unix_time_fix_timezone ( UnixTime *  self,
gint  new_gmtoff 
)

◆ unix_time_fix_timezone_assuming_the_time_matches_real_time()

gboolean unix_time_fix_timezone_assuming_the_time_matches_real_time ( UnixTime *  self)

◆ unix_time_fix_timezone_with_tzinfo()

void unix_time_fix_timezone_with_tzinfo ( UnixTime *  self,
TimeZoneInfo *  tzinfo 
)

◆ unix_time_from_unix_epoch()

UnixTime unix_time_from_unix_epoch ( guint64  unix_epoch)

◆ unix_time_set_now()

void unix_time_set_now ( UnixTime *  self)

◆ unix_time_set_timezone()

void unix_time_set_timezone ( UnixTime *  self,
gint  new_gmtoff 
)

◆ unix_time_set_timezone_with_tzinfo()

void unix_time_set_timezone_with_tzinfo ( UnixTime *  self,
TimeZoneInfo *  tzinfo 
)

◆ unix_time_to_unix_epoch()

guint64 unix_time_to_unix_epoch ( const UnixTime  ut)

◆ unix_time_unset()

void unix_time_unset ( UnixTime *  ut)