/*
- 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$
#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 */
*/
-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,
extern void tm_decode(struct date_time *dt, struct tm *tm);
extern void get_current_time(struct date_time *dt);
-extern btime_t get_current_btime(void);
#endif /* __btime_INCLUDED */