You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Rupert St John Webster <ru...@impress-solutions.com> on 2017/08/31 08:33:13 UTC

RE: Geode Native Client date format

Sorry, I can now see in Pulse that a dateTime format is stored as for example: Thu Aug 31 09:29:25 BST 2017

The problem is when the REST API does a GET for the value stored, it is being returned as DD/MM/YYYY only

Any ideas? Thanks 😊

From: Rupert St John Webster
Sent: 31 August 2017 09:23
To: dev@geode.apache.org
Subject: Geode Native Client date format

Hi,

The PDX writer has a writeDate method. This results in a PDX date in DD/MM/YYYY format. I’m looking for HH.MM.SS.fff as well but can’t find a way to do that?

Kind regards,

Re: Geode Native Client date format

Posted by Udo Kohlmeyer <ud...@apache.org>.
Hi there Robert,

As  Juan has indicated, the JSONFormatter is responsible for the 
conversion. Unfortunately, the current behavior is an all-or-nothing 
approach. Meaning if we change the formatter to convert data string with 
Date + Time, then all date fields have to contain time.

Which in some cases, is not the expected behavior.

We are thinking about ways to improve this behavior and make the 
conversion more adaptive and maybe configurable per JSON message. But 
this still has some way to go.

In the mean time, you could maybe try and convert the date into a long. 
That way you hold on to the time accuracy.

--Udo

On 8/31/17 01:39, Juan José Ramos wrote:
> Hello Robert,
>
> The *JSONFormatter* class, used internally in Geode to handle REST
> requests/responses, supports only "MM/DD/YYYY" dates, with no HH:MM:SS;
> while PDX supports all date fields, that's the reason why you see the
> difference in the output.
> There's already a GEODE ticket created for this: GEODE-226. You might want
> to add yourself as watcher to get updates about the progress.
> Hope this helps.
> Best regards.
>
>
> On Thu, Aug 31, 2017 at 9:33 AM, Rupert St John Webster <
> rupert@impress-solutions.com> wrote:
>
>> Sorry, I can now see in Pulse that a dateTime format is stored as for
>> example: Thu Aug 31 09:29:25 BST 2017
>>
>> The problem is when the REST API does a GET for the value stored, it is
>> being returned as DD/MM/YYYY only
>>
>> Any ideas? Thanks 😊
>>
>> From: Rupert St John Webster
>> Sent: 31 August 2017 09:23
>> To: dev@geode.apache.org
>> Subject: Geode Native Client date format
>>
>> Hi,
>>
>> The PDX writer has a writeDate method. This results in a PDX date in
>> DD/MM/YYYY format. I’m looking for HH.MM.SS.fff as well but can’t find a
>> way to do that?
>>
>> Kind regards,
>>
>
>


Re: Geode Native Client date format

Posted by Juan José Ramos <jr...@pivotal.io>.
Hello Robert,

The *JSONFormatter* class, used internally in Geode to handle REST
requests/responses, supports only "MM/DD/YYYY" dates, with no HH:MM:SS;
while PDX supports all date fields, that's the reason why you see the
difference in the output.
There's already a GEODE ticket created for this: GEODE-226. You might want
to add yourself as watcher to get updates about the progress.
Hope this helps.
Best regards.


On Thu, Aug 31, 2017 at 9:33 AM, Rupert St John Webster <
rupert@impress-solutions.com> wrote:

> Sorry, I can now see in Pulse that a dateTime format is stored as for
> example: Thu Aug 31 09:29:25 BST 2017
>
> The problem is when the REST API does a GET for the value stored, it is
> being returned as DD/MM/YYYY only
>
> Any ideas? Thanks 😊
>
> From: Rupert St John Webster
> Sent: 31 August 2017 09:23
> To: dev@geode.apache.org
> Subject: Geode Native Client date format
>
> Hi,
>
> The PDX writer has a writeDate method. This results in a PDX date in
> DD/MM/YYYY format. I’m looking for HH.MM.SS.fff as well but can’t find a
> way to do that?
>
> Kind regards,
>



-- 
Juan José Ramos Cassella
Senior Technical Support Engineer
Email: jramos@pivotal.io
Office#: +353 21 4238611
Mobile#: +353 87 2074066
After Hours Contact#: +1 877 477 2269
Office Hours: Mon - Thu 08:30 - 17:00 GMT. Fri 08:30 - 16:00 GMT
How to upload artifacts:
https://support.pivotal.io/hc/en-us/articles/204369073
How to escalate a ticket:
https://support.pivotal.io/hc/en-us/articles/203809556

[image: support] <https://support.pivotal.io/> [image: twitter]
<https://twitter.com/pivotal> [image: linkedin]
<https://www.linkedin.com/company/3048967> [image: facebook]
<https://www.facebook.com/pivotalsoftware> [image: google plus]
<https://plus.google.com/+Pivotal> [image: youtube]
<https://www.youtube.com/playlist?list=PLAdzTan_eSPScpj2J50ErtzR9ANSzv3kl>