Skip to content

Query format of datetimeoffset with fractionalSeconds #271

@mexavier

Description

@mexavier

Hi,

I'm using OData SDL for few months and I have a question relating on how to format of the datetimeoffset in a query.

According to the BNF, it is written :
dateTimeOffsetValue = year "-" month "-" day "T" hour ":" minute [ ":" second [ "." fractionalSeconds ] ] ( "Z" / sign hour ":" minute )

I try to query with the following format :

  • 2020-06-16T10:46:49.392%2B02:00
  • 2020-06-16T10:46:49%2E392%2B02:00

But I always get the following exception :

2020-06-16 15:53:45 [cher-531]                       ERROR ODataRendererActor$$anonfun$receive$1:52 - Invalid request - com.sdl.odata.api.parser.ODataUriParseException: ''&' expected but 'T' found'
com.sdl.odata.api.parser.ODataUriParseException: '&' expected but 'T' found
        at com.sdl.odata.parser.ODataUriParser.parseUri(ODataUriParser.scala:34)
        at com.sdl.odata.parser.ODataParserImpl.parseUri(ODataParserImpl.java:37)
        at com.sdl.odata.service.actor.ODataParserActor$$anonfun$receive$1.applyOrElse(ODataParserActor.scala:34)
        at akka.actor.Actor.aroundReceive(Actor.scala:517)
        at akka.actor.Actor.aroundReceive$(Actor.scala:515)
        at com.sdl.odata.service.actor.ODataParserActor.aroundReceive(ODataParserActor.scala:27)
        at akka.actor.ActorCell.receiveMessage(ActorCell.scala:592)
        at akka.actor.ActorCell.invoke(ActorCell.scala:561)
        at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:258)
        at akka.dispatch.Mailbox.run(Mailbox.scala:225)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)

Can you tell me if it is possible to query with fractional seconds and if so, how ?

Thank you

Xavier

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions