]> git.lyx.org Git - lyx.git/blob - src/support/lyxtime.h
Re-fix #11146 with recent LaTeX
[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 #include "support/strfwd.h"
20
21
22 namespace lyx {
23 namespace support {
24
25 time_t current_time();
26
27 /** Returns a locale-dependent formatting of the date and time encoded in \c t
28  *  The \p fmt string holds the formatting arguments of QDateTime::toString().
29  *  If fmt is empty then the formatting of the date and time is itself according
30  *  to the locale.
31  */
32 docstring formatted_datetime(time_t t, std::string const & fmt = "");
33
34 /**
35  * Inverse of asctime(gmtime()).
36  */
37 time_t from_asctime_utc(std::string t);
38
39 } // namespace support
40 } // namespace lyx
41
42 #endif // LYXTIME_H