From aae1f06ed783baa0b9ff3e2ffc520faa3fab948c Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Wed, 13 Aug 2014 00:54:15 +0200 Subject: [PATCH] Setting Gregorian timezone now invalidates Gregorian date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * It calculates Julian Day beforehands, so a valid date remains in timestamp * gswe_timestamp_set_gregorian_timezone() doesn’t emit the "changed" signal any more --- src/gswe-timestamp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gswe-timestamp.c b/src/gswe-timestamp.c index b4e6f83..3dee6e4 100644 --- a/src/gswe-timestamp.c +++ b/src/gswe-timestamp.c @@ -1025,13 +1025,13 @@ gswe_timestamp_set_gregorian_timezone( gdouble gregorian_timezone_offset, GError **err) { + gswe_timestamp_calculate_julian(timestamp, NULL); timestamp->priv->gregorian_timezone_offset = gregorian_timezone_offset; + timestamp->priv->valid_dates &= ~VALID_GREGORIAN; if (timestamp->priv->instant_recalc == TRUE) { gswe_timestamp_calculate_all(timestamp, err); } - - gswe_timestamp_emit_changed(timestamp); } /**