]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/btime.h
kes Add dynamic dll entry point for SHGetFolderPath to Win32 code.
[bacula/bacula] / bacula / src / lib / btime.h
index b298279c04a2a84dbe6489bbdbcef514b948216c..38b4eedee6f9bb44e48ba4599c72ab9ba226fd33 100644 (file)
@@ -1,34 +1,62 @@
 
-/*  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 */
 /*
-   Copyright (C) 2000, 2001, 2002 Kern Sibbald and John Walker
 
-   This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+  See btime.c for defintions.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
+     Version $Id$
+
+ */
+/*
+   Bacula® - The Network Backup Solution
+
+   Copyright (C) 2000-2006 Free Software Foundation Europe e.V.
+
+   The main author of Bacula is Kern Sibbald, with contributions from
+   many others, a complete list can be found in the file AUTHORS.
+   This program is Free Software; you can redistribute it and/or
+   modify it under the terms of version two of the GNU General Public
+   License as published by the Free Software Foundation plus additions
+   that are listed in the file LICENSE.
+
+   This program is distributed in the hope that it will be useful, but
+   WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
    General Public License for more details.
 
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA.
 
- */
+   Bacula® is a registered trademark of John Walker.
+   The licensor of Bacula is the Free Software Foundation Europe
+   (FSFE), Fiduciary Program, Sumatrastrasse 25, 8006 Zürich,
+   Switzerland, email:ftf@fsfeurope.org.
+*/
 
 
 #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 *bstrftimes(char *dt, int maxlen, utime_t tim);
+char *bstrftime_ny(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 +79,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 +103,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 */