]> git.lyx.org Git - lyx.git/blob - src/support/lyxtime.h
correct format for unsigned long argument, remoteCloseLink is oneway void
[lyx.git] / src / support / lyxtime.h
1 // -*- C++ -*-
2 /**
3  * \file lyxtime.h
4  * This file is part of LyX, the document processor.
5  * Licence details can be found in the file COPYING.
6  *
7  * \author John Levon
8  * \author Jürgen Spitzmüller
9  *
10  * Full author contact details are available in file CREDITS.
11  */
12
13 #ifndef LYXTIME_H
14 #define LYXTIME_H
15
16 #include <time.h>
17 #include <string>
18
19
20 namespace lyx {
21 namespace support {
22
23 time_t current_time();
24
25 /** Returns a locale-dependent formatting of the date
26  *  and time encoded in \c time. The \p fmt string
27  *  holds the formatting arguments of \c strftime.
28  */
29 std::string const formatted_time(time_t t, std::string const & fmt);
30
31 /**
32  * Inverse of ctime().
33  * Since ctime() outputs the local time, the caller needs to ensure that the
34  * time zone and daylight saving time are the same as when \p t was created
35  * by ctime().
36  */
37 time_t from_ctime(std::string t);
38
39 } // namespace support
40 } // namespace lyx
41
42 #endif // LYXTIME_H