diff options
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/common.c b/src/common.c index 473213d6..844dafdf 100644 --- a/src/common.c +++ b/src/common.c | |||
@@ -81,10 +81,19 @@ GNUNET_GTK_get_expiration_time (GtkSpinButton *spin) | |||
81 | year = gtk_spin_button_get_value_as_int (spin); | 81 | year = gtk_spin_button_get_value_as_int (spin); |
82 | memset (&t, 0, sizeof (t)); | 82 | memset (&t, 0, sizeof (t)); |
83 | if (year < 1900) | 83 | if (year < 1900) |
84 | return GNUNET_TIME_absolute_get (); /* now */ | 84 | { |
85 | GNUNET_break (0); | ||
86 | return GNUNET_TIME_absolute_get (); /* now */ | ||
87 | } | ||
85 | t.tm_year = year - 1900; | 88 | t.tm_year = year - 1900; |
89 | t.tm_mday = 1; | ||
90 | t.tm_mon = 1; | ||
91 | t.tm_wday = 1; | ||
92 | t.tm_yday = 1; | ||
86 | tp = mktime (&t); | 93 | tp = mktime (&t); |
87 | ret.abs_value = tp * 1000; /* seconds to ms */ | 94 | GNUNET_break (tp != (time_t) -1); |
95 | ret.abs_value = tp * 1000LL; /* seconds to ms */ | ||
96 | GNUNET_break (GNUNET_TIME_absolute_get ().abs_value < ret.abs_value); | ||
88 | return ret; | 97 | return ret; |
89 | } | 98 | } |
90 | 99 | ||