diff --git a/src/gswe-timestamp.c b/src/gswe-timestamp.c index aba63eb..b6df5e4 100644 --- a/src/gswe-timestamp.c +++ b/src/gswe-timestamp.c @@ -1701,9 +1701,11 @@ gswe_timestamp_new_from_gregorian_full( GsweTimestamp * gswe_timestamp_new_from_julian_day(gdouble julian_day) { - GsweTimestamp *timestamp = gswe_timestamp_new(); + GsweTimestamp *timestamp; - gswe_timestamp_set_julian_day_et(timestamp, julian_day, NULL); + timestamp = GSWE_TIMESTAMP(g_object_new(GSWE_TYPE_TIMESTAMP, + "julian-day", julian_day, + NULL)); return timestamp; }