MobilityDB 1.3
Loading...
Searching...
No Matches
Macros | Functions
timestamp.c File Reference
#include <limits.h>
#include "postgres.h"
#include "../../include/meos.h"
#include "utils/timestamp_def.h"
#include "utils/datetime.h"
#include <sys/time.h>

Macros

#define SAMESIGN(a, b)   (((a) < 0) == ((b) < 0))
 

Functions

int date2isoweek (int year, int mon, int mday)
 
int date2isoyear (int year, int mon, int mday)
 
int date2isoyearday (int year, int mon, int mday)
 
static Timestamp dt2local (Timestamp dt, int timezone)
 
void dt2time (Timestamp jd, int *hour, int *min, int *sec, fsec_t *fsec)
 
void EncodeSpecialTimestamp (Timestamp dt, char *str)
 
TimestampTz GetCurrentTimestamp (void)
 
void GetEpochTime (struct pg_tm *tm)
 
int interval2tm (Interval span, struct pg_tm *tm, fsec_t *fsec)
 
void isoweek2date (int woy, int *year, int *mon, int *mday)
 
int isoweek2j (int year, int week)
 
void isoweekdate2date (int isoweek, int wday, int *year, int *mon, int *mday)
 
Timestamp SetEpochTimestamp (void)
 
static TimeOffset time2t (const int hour, const int min, const int sec, const fsec_t fsec)
 
int timestamp2tm (Timestamp dt, int *tzp, struct pg_tm *tm, fsec_t *fsec, const char **tzn, pg_tz *attimezone)
 
int timestamp_cmp_internal (Timestamp dt1, Timestamp dt2)
 
int tm2interval (struct pg_tm *tm, fsec_t fsec, Interval *span)
 
int tm2timestamp (struct pg_tm *tm, fsec_t fsec, int *tzp, Timestamp *result)