[Lazarus] JSON and Object Pascal DateTime

Michael Van Canneyt michael at freepascal.org
Tue Jan 31 08:27:39 CET 2012



On Tue, 31 Jan 2012, silvioprog wrote:

> 2012/1/30 Luiz Americo Pereira Camara <luizmed at oi.com.br>:
>> On 30/1/2012 17:09, silvioprog wrote:
>>>
>>> Hello,
>>>
>>> What the best way to save a datetime value in a JSON object?
>>
>>
>> I store as a float
>>
>> Luiz
>
> Me too. ^^

In that case, why do you still ask ? :-)

Like I said, there is no standard, it really depends on the code in the browser what to send best.
(I assume, of course, that the JSON is sent to a browser).  Sending as text has the advantage that 
you can check your server responses visually and see what date/time is sent. 
A float like 45685.25 is a valid timestamp, but which date/time is it ?

Michael.




More information about the Lazarus mailing list