mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Fix an off-by-2 error in the leap year calculation. (#344905, Dan Winship)
2006-06-20 Matthias Clasen <mclasen@redhat.com> * glib/gtimer.c (mktime_utc): Fix an off-by-2 error in the leap year calculation. (#344905, Dan Winship) * tests/testglib.c (main): Change the test data for the g_time_val_from_iso8601 tests to expose an off-by-2 error in the leap year calculation.
This commit is contained in:
committed by
Matthias Clasen
parent
de6a4865a0
commit
1f536d2f12
@@ -1178,10 +1178,10 @@ main (int argc,
|
||||
g_timer_destroy(timer);
|
||||
g_timer_destroy(timer2);
|
||||
|
||||
#define REF_SEC_UTC 343737360
|
||||
#define REF_STR_UTC "1980-11-22T10:36:00Z"
|
||||
#define REF_STR_CEST "1980-11-22T12:36:00+02:00"
|
||||
#define REF_STR_EST "1980-11-22T05:36:00-05:00"
|
||||
#define REF_SEC_UTC 320063760
|
||||
#define REF_STR_UTC "1980-02-22T10:36:00Z"
|
||||
#define REF_STR_CEST "1980-02-22T12:36:00+02:00"
|
||||
#define REF_STR_EST "1980-02-22T05:36:00-05:00"
|
||||
|
||||
g_print ("checking g_time_val_from_iso8601...\n");
|
||||
ref_date.tv_sec = REF_SEC_UTC;
|
||||
|
Reference in New Issue
Block a user