Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 80876

REST GET and (localized) datetime attributes

$
0
0

scenario

my mendix application publishes a REST GET api with a datetime attribute in the request
In the response i return database records with datetime attribute >= requested datetime attribute
Both the request and response datetime attribute are defined in nonpersistent domain attributes with property Localize set to Yes.

    example

    1. My request in SoapUI contains "2017-05-12 14:20:50.000"
      NB: the time is specified as a localized time
    2. in the debugger i see:  UTC time: 2017-05-12 12:20:50.000 Session time: 2017-05-12 14:20:50.000 +0200
      NB: the time is interpreted by Mendix as a localized time. Adding a 'Z' in the timestring at 1. does not make a difference. Mendix keeps seeing it as localized 
    3. My response in the debugger contains: UTC time: 2017-05-12 13:51:54.866 Session time: 2017-05-12 15:51:54.866 +0200
      NB: this is a correct selection, as the response time >= request time
    4. My response in SoapUI "2017-05-12T13:51:54.866Z"
      NB: this is a correct result, however presented in UTC or Zulu time.

    problem

    To a user this is confusing:

    • i cannot manipulate the fact Mendix interprets request as localized
    • i cannot manipulate the fact Mendix responds with a UTC time
    • for the user it is importent that both request and response time are the same type: either both UTC or both localized

     

    Any ideas?


    Viewing all articles
    Browse latest Browse all 80876

    Trending Articles



    <script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>