static vars and sprintf-less datetime decoding