tests++
[awesomized/ext-ion] / ion_private.h
index 7233f464c4ec2b89b3b58068f4d519568782223e..b168f900ea3b3a2e8f9624ec91242bdd882d837e 100644 (file)
@@ -917,6 +917,11 @@ LOCAL timelib_time* php_time_from_ion(const ION_TIMESTAMP *ts, decContext *ctx,
 {
        timelib_time *time = ecalloc(1, sizeof(*time));
 
+       /* defaults */
+       time->y = 1970;
+       time->m = 1;
+       time->d = 1;
+
        switch (ts->precision & 0x7f) {
        case ION_TS_FRAC:
                time->us = php_usec_from_ion(&ts->fraction, ctx);