1

In MediaWiki's old query-continue style, it passes you a bunch of values that you're supposed to reflect back to MediaWiki unaltered. For example:

"query-continue": {
    "deletedrevs": {
        "drstart": "2014-09-06T20:14:15Z"
    }
}

How do I get the value as the exact string that was sent rather than a DateTime value? Asking for (string)prop.Value converts the object to a DateTime first and only then to a string, which results in returning the wrong date format.

The only thing I'm coming up with right now is checking to see if the value of the JProperty is a date, then converting the date back into ISO 8601, but considering that's how it was sent in the first place, that seems rather kludgy.

Andrew Whitaker
  • 124,656
  • 32
  • 289
  • 307

0 Answers0