Setting Gregorian timezone now invalidates Gregorian date

* 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
This commit is contained in:
Gergely Polonkai 2014-08-13 00:54:15 +02:00
parent 8bf5a49c4b
commit aae1f06ed7
1 changed files with 2 additions and 2 deletions

View File

@ -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);
}
/**