You are not logged in.
Pages: 1
I know this has been covered before (e.g., http://synopse.info/forum/viewtopic.php?id=2047), but in my situation I have a datetime field that I'm returning in a JSON representation of a datetime value, where milliseconds is required in the ISO 8601 format.
Is there a reason milliseconds were omitted?
Is there a way to for me to generically customize the JSON serialization routine to add support for milliseconds for *all* RTTI generic record serializations or do I need to create a customized serialization routine for every record I'm converting to JSON that has this requirement?
Thanks
Offline
See http://synopse.info/forum/viewtopic.php?id=3292 about my proposal.
There are slightly outdated patch. I plan to update it soon.
Offline
Thanks. Hopefully this will get included by default in the near future.
Offline
I wish the ISO8601 datetime values stored by the framework has milliseconds too!
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
I still don't like much the use of conditional compilation to enable such a global feature.
In addition to milliseconds, appending "Z" as UTC time zone may make sense.
We may just switch to MS resolution everywhere for TDateTime.
Using TTimeLog for Seconds resolution and our Int64 bit-layared storage, and TDateTimeSec for TDateTime with Seconds resolution (the old behavior).
And I would like to add native TUnixTime type to the framework, which is known by SQLite3 and a lot of libraries (including JavaScript).
Backward compatibility will work by assuming MS=0 for old serialized content.
Offline
Pages: 1