diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-02-02 01:02:50 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-02-02 01:02:50 +0100 |
| commit | b1464249c7b403a66ca63f403c80c39f1af63e65 (patch) | |
| tree | 966daea7402bf5c2454c1b5ff0967768d2acd481 /src/local_time.h | |
| parent | c89ed445b9fcd4d6c76cbf3278dd2d7d7e2e0a42 (diff) | |
Add with_timezone parameter to ::to_string().
Diffstat (limited to 'src/local_time.h')
| -rw-r--r-- | src/local_time.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/local_time.h b/src/local_time.h index 7c91db3e..c76b876c 100644 --- a/src/local_time.h +++ b/src/local_time.h @@ -92,8 +92,10 @@ public: , _offset(offset) {} - /** @return A string of the form 2013-01-05T18:06:59+04:00 or 2013-01-05T18:06:59.123+04:00 */ - std::string as_string (bool with_millisecond = false) const; + /** @return A string of the form 2013-01-05T18:06:59+04:00, 2013-01-05T18:06:59.123+04:00 + * 2013-01-05T18:06:59 or 2013-01-05T18:06:59.123 + */ + std::string as_string(bool with_millisecond = false, bool with_timezone = true) const; /** @return The date in the form YYYY-MM-DD */ std::string date () const; |
