Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon API > API issue with autoresponder times

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon API  /

API issue with autoresponder times

I believe I have uncovered a bug in the XML API or perhaps MDaemon/WC. I
am running MD 21.0.2. I have a program that uses the XML API to gather
the out of office [OOF] information to see which autoresponders are
currently active. If I set my autoresponder in WorldClient as follows:


and save the data, it saves it in the HiWater.mrk file as:

[OOF]
Enabled=Yes
PassMessage=No
StartTime=2021-06-11 11:00
EndTime=2021-06-11 11:42
Days=0

So MDaemon/WC is saving the time information in the local time zone as
it was entered.  Going back into the autoresponder screen shows the data
as it was saved.  Which is expected.

Using the following API call: (?xml version='1.0'
encoding='UTF-8'?)(MDaemon)(API)(Request version='19.0.0' echo='1'
verbose='1')(Operation)GetUserInfo(/Operation)(Parameters)(Domain)example.com(/Domain)(Mailbox)user.mailbox(/Mailbox)(Get)(AutoResponder/)(/Get)(/Parameters)(/Request)(/API)(/MDaemon)

I get the following response in the AutoResponder section:

[AutoResponder] =) Array
     (
     [Enabled] =) Yes
     [Start] =) 2021-06-11T11:00:00.000Z
     [End] =) 2021-06-11T11:42:00.000Z
     [Response] =) The message.
     [DaysActive] =) Array
         (
         [@attributes] =) Array
             (
             [mask] =) 0
             )
         )
     )

The trailing Z's in the start and end times indicate that the time zone
is UTC (see https://www.cl.cam.ac.uk/~mgk25/iso-time.html the section
Time zone). But, the MDaemon server and I are in CDT or -0500 not UTC.
So the returned times are off by the time zone offset.

This all used to work correctly and has somehow broken since I set it up
when how the autoresponders are stored was changed in MD20.  I think
back then the times were all saved in the [OOF] section as UTC because I
have old code from before I used the XML API that directly reads the
[OOF] section of the HiWater.mrk. All of it does UTC offsets on the
values read from it.


Jay Tolbert

--
Jay Tolbert
Dickerson Engineering, Inc.


  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Jay Tolbert - Jun 14, 2021 3:42 pm (#1 Total: 2)  

 

Photo of Author
Jay Tolbert
Guru
Guru
Posts: 2839

MDaemon
RelayFax
SecurityPlus
WebAdmin
It didn't like my image from WC.  The settings I have are:

check Enable autoresponder
check Only send during this time range:
 From 06/11/2021 11:00 AM
Until: 06/11/2021 11:42 AM

Jay Tolbert
Dickerson Engineering, Inc.

On 6/14/2021 3:40 PM, Jay Tolbert wrote:
> I believe I have uncovered a bug in the XML API or perhaps MDaemon/WC.
> I am running MD 21.0.2. I have a program that uses the XML API to
> gather the out of office [OOF] information to see which autoresponders
> are currently active. If I set my autoresponder in WorldClient as
> follows:
>
>
> and save the data, it saves it in the HiWater.mrk file as:
>
> [OOF]
> Enabled=Yes
> PassMessage=No
> StartTime=2021-06-11 11:00
> EndTime=2021-06-11 11:42
> Days=0
>
> So MDaemon/WC is saving the time information in the local time zone as
> it was entered.  Going back into the autoresponder screen shows the
> data as it was saved.  Which is expected.
>
> Using the following API call: (?xml version='1.0'
> encoding='UTF-8'?)(MDaemon)(API)(Request version='19.0.0' echo='1'
> verbose='1')(Operation)GetUserInfo(/Operation)(Parameters)(Domain)example.com(/Domain)(Mailbox)user.mailbox(/Mailbox)(Get)(AutoResponder/)(/Get)(/Parameters)(/Request)(/API)(/MDaemon)
>
>
> I get the following response in the AutoResponder section:
>
> [AutoResponder] =) Array
>     (
>     [Enabled] =) Yes
>     [Start] =) 2021-06-11T11:00:00.000Z
>     [End] =) 2021-06-11T11:42:00.000Z
>     [Response] =) The message.
>     [DaysActive] =) Array
>         (
>         [@attributes] =) Array
>             (
>             [mask] =) 0
>             )
>         )
>     )
>
> The trailing Z's in the start and end times indicate that the time
> zone is UTC (see https://www.cl.cam.ac.uk/~mgk25/iso-time.html the
> section Time zone). But, the MDaemon server and I are in CDT or -0500
> not UTC. So the returned times are off by the time zone offset.
>
> This all used to work correctly and has somehow broken since I set it
> up when how the autoresponders are stored was changed in MD20. I think
> back then the times were all saved in the [OOF] section as UTC because
> I have old code from before I used the XML API that directly reads the
> [OOF] section of the HiWater.mrk. All of it does UTC offsets on the
> values read from it.
>
>
> Jay Tolbert
>




  (newer msg:1)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.