[EMAIL PROTECTED] writes:

> Andreas Junghans <[EMAIL PROTECTED]> writes:
>
>> I would greatly prefer a single, standard format, no matter in which
>> direction a date is sent.  ...  Since it's so difficult to properly handle
>> timestamps in PHP (and maybe other backends too), I suggest we standardize
>> on the second syntax: new Date(Date.UTC(...)). More comments on that below.
>
> I would have a slight preference to use the same format in both directions,
> but I found that I'd have to entirely rewrite the JSON parser in PHP to use
> this alternate format.  The current one uses commas as a separation point at
> a level that is not easily modifiable, so getting the entire
> "DATE(Date.UTC(x,y,z...))" as a string for easy parsing isn't part if this
> parser's design .  I'm *really* not eager to rewrite a JSON parser.  The
> format I selected is so incredibly easy to parse that any server should be
> able to deal with it.  That's why I switched to it.

Having just spent the last couple hours beating myself over the head for
making such a stupid comment, I'll own up to it.  My statement, above, is a
terrible reason to make a technical design decision.  I will revisit the PHP
JSON parser to figure out how to parse the Date(Date.UTC(...)) format.

When I started working on a replacement for msSinceEpoch, I had every
intention of using the same format in both directions.  When I discovered that
parsing the UTC format was difficult, I switched to using the ISO-8601 format,
being absolutely convinced that the browser would parse that format, and it
was intended to be used both directions.  I was quite surprised to find that
the browser, in fact, did not understand that format, so I switched the
to-client code to use the UTC format.  I did not revisit the PHP parser code.

If it's feasible to do, I would like to at least have the ability to have the
same format going both directions.  I'll let you know the results.

Derrell


_______________________________________________
Qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to