PT::Date is serializing in the form YYYY-MM-DDTHH:MM:SSZ (eg: 1990-02-12T13:05:39Z) to JSON
git-svn-id: svn://ttmath.org/publicrep/morm/trunk@1090 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
c7bd935a80
commit
925017300b
|
@ -329,11 +329,7 @@ void BaseExpression::esc(void* val, PT::TextStream & stream)
|
||||||
|
|
||||||
void BaseExpression::esc(const PT::Date & date, PT::TextStream & stream)
|
void BaseExpression::esc(const PT::Date & date, PT::TextStream & stream)
|
||||||
{
|
{
|
||||||
//stream << date;
|
stream << date;
|
||||||
|
|
||||||
// temporarily
|
|
||||||
// we need to send a form which is acceptable by Gson
|
|
||||||
date.SerializeYearMonthDay(stream);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,11 @@
|
||||||
namespace morm
|
namespace morm
|
||||||
{
|
{
|
||||||
|
|
||||||
|
void FlatExpression::esc(const PT::Date & date, PT::TextStream & stream)
|
||||||
|
{
|
||||||
|
date.SerializeISO(stream);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -43,7 +43,9 @@ namespace morm
|
||||||
|
|
||||||
class FlatExpression : public BaseExpression
|
class FlatExpression : public BaseExpression
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
void esc(const PT::Date & date, PT::TextStream & stream);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue