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:
parent
8bf5a49c4b
commit
aae1f06ed7
@ -1025,13 +1025,13 @@ gswe_timestamp_set_gregorian_timezone(
|
|||||||
gdouble gregorian_timezone_offset,
|
gdouble gregorian_timezone_offset,
|
||||||
GError **err)
|
GError **err)
|
||||||
{
|
{
|
||||||
|
gswe_timestamp_calculate_julian(timestamp, NULL);
|
||||||
timestamp->priv->gregorian_timezone_offset = gregorian_timezone_offset;
|
timestamp->priv->gregorian_timezone_offset = gregorian_timezone_offset;
|
||||||
|
timestamp->priv->valid_dates &= ~VALID_GREGORIAN;
|
||||||
|
|
||||||
if (timestamp->priv->instant_recalc == TRUE) {
|
if (timestamp->priv->instant_recalc == TRUE) {
|
||||||
gswe_timestamp_calculate_all(timestamp, err);
|
gswe_timestamp_calculate_all(timestamp, err);
|
||||||
}
|
}
|
||||||
|
|
||||||
gswe_timestamp_emit_changed(timestamp);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user