]> git.lyx.org Git - features.git/commitdiff
Rename misleading function name from_gmtime() to form_asctime_utc()
authorKornel Benko <kornel@lyx.org>
Wed, 9 Jan 2013 12:45:58 +0000 (13:45 +0100)
committerKornel Benko <kornel@lyx.org>
Wed, 9 Jan 2013 12:45:58 +0000 (13:45 +0100)
src/support/lyxtime.cpp
src/support/lyxtime.h
src/tex2lyx/text.cpp

index f5290a2324a4cf67696c1928221ae81316958250..3150825d753f80c3dd95ae15b6147b5c4a8d5114 100644 (file)
@@ -40,7 +40,7 @@ string const formatted_time(time_t t, string const & fmt)
 }
 
 
-time_t from_gmtime(string t)
+time_t from_asctime_utc(string t)
 {
        // Example for the format: "Sun Nov  6 10:39:39 2011\n"
        // Generously remove trailing '\n' (and other whitespace if needed)
index fcb22bd135c8ab6bb88bffe9ca755bddf48caf79..74586cf7de947264ed07a2beb7cc57486c6bfe5a 100644 (file)
@@ -29,12 +29,9 @@ time_t current_time();
 std::string const formatted_time(time_t t, std::string const & fmt);
 
 /**
- * Inverse of ctime().
- * Since ctime() outputs the local time, the caller needs to ensure that the
- * time zone and daylight saving time are the same as when \p t was created
- * by ctime().
+ * Inverse of asctime(gmtime()).
  */
-time_t from_gmtime(std::string t);
+time_t from_asctime_utc(std::string t);
 
 } // namespace support
 } // namespace lyx
index 2ccc7cd7c60f8e4deba6e19f247bf3aafef76a52..ae44d85be57eee71041665eff35a03e8054e8f0b 100644 (file)
@@ -3204,9 +3204,9 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                        string localtime = p.getArg('{', '}');
                        preamble.registerAuthor(name);
                        Author const & author = preamble.getAuthor(name);
-                       // from_gmtime() will fail if LyX decides to output the
+                       // from_asctime_utc() will fail if LyX decides to output the
                        // time in the text language.
-                       time_t ptime = from_gmtime(localtime);
+                       time_t ptime = from_asctime_utc(localtime);
                        if (ptime == static_cast<time_t>(-1)) {
                                cerr << "Warning: Could not parse time `" << localtime
                                     << "ยด for change tracking, using current time instead.\n";