Parse ISO8601 date string to date with UTC Timezone. The java.time classes use the standard ISO 8601 formats by default when parsing/generating strings. Request #51987: Datetime fails to parse an ISO 8601 ordinal date (extended format) Submitted: 2010-06-03 13:55 UTC: Modified: 2017-03-11 22:37 UTC.
Active6 years, 2 months ago
Short story: the guy that originally wrote this code was [and probably still is] pants-on-head retarded.
![Parse Parse](/uploads/1/3/3/4/133402085/769442822.jpg)
The code in question receives payment events from our provider and logs them into the database with the format:
'o-m-d H:i:s'
This is all well and good, except the
%o
modifier will give you a different year if the ISO-8601 week 'belongs' to a different year. [Reference] Driver imprimante epson stylus s21 software.Case in point: we have payments logged for 2013-12-31 which, in normal/not-crazy-person date, should be 2012-12-31. So for all intents and purposes we see what appear to be payments happening in the future, and occasionally in the past.
The real problem here is that I cannot find any date parsing function in PHP or mySQL that will interpret the
%o
flag, thus preventing me from re-formatting these dates back into something sane.Does anyone know how to get these dates interpreted properly?
SammitchSammitch![Php parse iso 8601 date Php parse iso 8601 date](/uploads/1/3/3/4/133402085/268613426.jpg)
21.3k44 gold badges3131 silver badges6767 bronze badges
1 Answer
No, nothing I know of. However, doing a grep for all your files for
o-m-d
, which is a rather unique term, should solve you 98% of your problems through the entire codebase.Python Parse Iso 8601 Time
If you're using a VCS (and since you sound like a sane person, you probably are), make a commit, grep (or super-search-and-replace), and see if it works better for you, if it does, commit, if not, discard. It's really as simple as that.
If that doesn't work for you.. Well.. May God have mercy upon your soul. Drivers canon mf toolbox 4.9.
Madara Uchiha♦Madara UchihaIso 8601 Calendar
123k4848 gold badges223223 silver badges275275 bronze badges
Php Parse Iso 8601 Date
Got a question that you can’t ask on public Stack Overflow? Learn more about sharing private information with Stack Overflow for Teams.