From: Mikko Rasa Date: Mon, 30 May 2011 20:16:00 +0000 (+0300) Subject: Flip the sign of TimeZone offset so it makes more sense X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=c8c97ab483cfbf1bb3d0788cf729be92091ba2fc;p=libs%2Fcore.git Flip the sign of TimeZone offset so it makes more sense --- diff --git a/source/time/datetime.cpp b/source/time/datetime.cpp index 415ce40..7fa8cee 100644 --- a/source/time/datetime.cpp +++ b/source/time/datetime.cpp @@ -186,7 +186,7 @@ void DateTime::set_timezone(const TimeZone &tz) void DateTime::convert_timezone(const TimeZone &tz) { - add_raw((zone.get_offset()-tz.get_offset()).raw()); + add_raw((tz.get_offset()-zone.get_offset()).raw()); zone = tz; } @@ -296,7 +296,7 @@ string DateTime::format_rfc3339() const if(const TimeDelta &offs = zone.get_offset()) { int m = abs(static_cast(offs/Time::min)); - result += Msp::format("%c%02d:%02d", (offs