From 6fbba420657d893a5da770af20364af4d689d4b7 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Thu, 1 Dec 2022 21:47:21 +0100 Subject: Add new LocalTime constructor. --- src/local_time.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/local_time.h b/src/local_time.h index d2f4b2c5..58acc227 100644 --- a/src/local_time.h +++ b/src/local_time.h @@ -80,6 +80,15 @@ public: /** @param s A string of the form 2013-01-05T18:06:59[.123][+04:00] */ explicit LocalTime (std::string s); + LocalTime(int year, int month, int day, int hour, int minute, UTCOffset offset) + : _year(year) + , _month(month) + , _day(day) + , _hour(hour) + , _minute(minute) + , _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; -- cgit v1.2.3