Mercurial > hg > octave-lyh
diff liboctave/oct-time.cc @ 3255:4d33b1e56bff
[project @ 1999-07-15 20:54:14 by jwe]
author | jwe |
---|---|
date | Thu, 15 Jul 1999 20:54:34 +0000 |
parents | 07d2d307c43e |
children | b1969349f689 |
line wrap: on
line diff
--- a/liboctave/oct-time.cc +++ b/liboctave/oct-time.cc @@ -58,6 +58,12 @@ #endif } +string +octave_time::ctime (void) const +{ + return octave_localtime (*this) . asctime (); +} + void octave_time::stamp (void) { @@ -118,7 +124,7 @@ #endif string -octave_base_tm::format_as_string (const string& fmt) const +octave_base_tm::strftime (const string& fmt) const { string retval; @@ -150,7 +156,7 @@ buf = new char[bufsize]; buf[0] = '\0'; - chars_written = strftime (buf, bufsize, fmt_str, &t); + chars_written = ::strftime (buf, bufsize, fmt_str, &t); bufsize *= 2; } @@ -194,7 +200,7 @@ { tm_usec = ot.usec (); - time_t t = ot.unix_time (); + time_t t = ot; octave_base_tm::init (localtime (&t)); } @@ -204,7 +210,7 @@ { tm_usec = ot.usec (); - time_t t = ot.unix_time (); + time_t t = ot; octave_base_tm::init (gmtime (&t)); }