]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/btime.h
Use the command line utility dropdb instead of the psql command
[bacula/bacula] / bacula / src / lib / btime.h
index b298279c04a2a84dbe6489bbdbcef514b948216c..9f5b5d1986ca590d6e93c39c104057eeb9299e56 100644 (file)
@@ -1,10 +1,12 @@
 
-/*  Time and date structures and functions.
-    Date and time are always represented internally
-    as 64 bit floating point Julian day numbers and
-    fraction.  The day number and fraction are kept
-    as separate quantities to avoid round-off of
-    day fraction. John Walker */
+/*  
+
+  See btime.c for defintions.
+
+     Version $Id$
+
+ */
+
 /*
    Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
 #ifndef __btime_INCLUDED
 #define __btime_INCLUDED
 
+/* New btime definition -- use this */
+btime_t get_current_btime(void);
+time_t btime_to_unix(btime_t bt);   /* bacula time to epoch time */
+utime_t btime_to_utime(btime_t bt); /* bacula time to utime_t */
+
+int tm_wom(int mday, int wday);
+int tm_woy(time_t stime);
+
+char *bstrutime(char *dt, int maxlen, utime_t tim);
+char *bstrftime(char *dt, int maxlen, utime_t tim);
+char *bstrftime_nc(char *dt, int maxlen, utime_t tim);
+utime_t str_to_utime(char *str);
+
+
+/* =========================================================== */
+/*        old code deprecated below. Do not use.               */
+
 typedef float64_t fdate_t;             /* Date type */
 typedef float64_t ftime_t;             /* Time type */
 
@@ -51,7 +70,6 @@ struct date_time {
 
 */
 
-extern void bstrftime(char *dt, int maxlen, uint32_t tim);
 
 extern fdate_t date_encode(uint32_t year, uint8_t month, uint8_t day);
 extern ftime_t time_encode(uint8_t hour, uint8_t minute, uint8_t second,
@@ -76,4 +94,5 @@ extern void tm_encode(struct date_time *dt, struct tm *tm);
 extern void tm_decode(struct date_time *dt, struct tm *tm);
 extern void get_current_time(struct date_time *dt);
 
+
 #endif /* __btime_INCLUDED */