Yet another failure by MJ Freeway / LeafData in their endavour in Washington.

It appears that on March 25th, at 6:45 AM UTC (about 22:45 Seattle Time) there was an update deployed to the LeafData system. This time, they’ve mangled the date formats so badly that their own preferred language (PHP) has difficulty interpreting it (strtotime). No release notes were included, this change was not announced.

Date Format History

Back in December of 2017, before this dumpster fire was even launched (it was in it’s first delay period) I requested that MJ Freeway format all dates using the ISO 8601/RFC3339 standard format. Literally everyone else does it that way, eg Amazon, Twilio, etc; all the big guys. In the cannabis softwware space many (most?) of this software providers do it. Of the three player for government software (BioTrack, MJ Freeway/LeafData, Franwell/METRC) only METRC is folloing this international standard.

The ISO standard is formatting something like YYYY-MM-DD HH:MM:SS. Always four digit year first, two digit month, two digit day, two digit hour in 24 hour notation, two digit minute, two digit second.

LeafData started off with date formats like this (observed Feb 4th, 2018):

12/10/2017 03:48pm

This is all well and good, easy for code to parse but a little ambiguous. Then, on March 25th they switched to sending this kind of value:

12/10/2017 15:48pm

And this date is not parseable by strtotime in PHP5 or PHP7. It’s because 15:48pm makes no sense, 15:48 is fine, or 03:48 pm is OK, but this is freaking nonsense.

They partially implemented a 24h clock, but kept the meridiem indicator. So, here we can see that their team went into some date-output formatting code, it’s been obviously been changed. Why not just do it correctly and implement ISO standard? And they use PHP, so why not use one of the constants provided by the PHP DateTime interface? For example, the RFC 3339 format is trivial:

echo $dt->format(DateTime::RFC3339);

Why Why Why?

Why can’t MJ Freeway/LeafData or the LCB get this one simple, and VERY CRITICAL componenent of their seed-to-sale, track-and-trace reporting engine working properly? They’ve been given the answer months ago. They’ve been in the code, modifying these exact fields, this exact format. Somehow, being given the answer months ago, and even updating the code they’ve still managed to get it wrong.

Maybe these reviews on Glass Door provide some insight: https://www.glassdoor.com/Reviews/MJ-Freeway-Reviews-E1062096.htm