From c8c97ab483cfbf1bb3d0788cf729be92091ba2fc Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Mon, 30 May 2011 23:16:00 +0300 Subject: [PATCH] Flip the sign of TimeZone offset so it makes more sense --- source/time/datetime.cpp | 4 ++-- source/time/timezone.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) 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