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.


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

Keith Personett (apparently) - Jun 15, 2021 10:52 am (#2 Total: 2)  

via email  

Photo of Author
Keith Personett
Newbie
Newbie
Posts: 76

Jay,

 

I will make sure that the time returned in the XML API call is ZULU/GMT and that it ensures that it converts it to server local time upon saving an AutoResponder.

 

The XML API deals with time in ZULU/GMT because it is “generally” absolute, and we never know where (or in what time zone) the API client is located.

 

 

Keith Personett

Senior Software Developer, Cerebro Calibration Specialist, Agent of S.H.I.E.LD., Helicarrier Systems Analyst

MDaemon Technologies http://www.mdaemon.com/ or on Facebook

Sent using Outlook 2013 via ActiveSync Services for MDaemon Messaging Server.

I 16 1018

"You get hurt, hurt 'em back. You get killed... walk it off!"

                - Steve Rogers/Captain America

 

From: md-api@mdaemon.com [mailto:md-api@mdaemon.com] On Behalf Of lists-md-api@mdaemon.com (Jay Tolbert)
Sent: Monday, June 14, 2021 3:42 PM
To: md-api List Member <md-api@mdaemon.com>
Subject: [md-api] API issue with autoresponder times

 

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
>

 

------------------------------------------------------
View/reply at <http://lists.altn.com/WebX?13@@.59863b3e/0>

--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion.  MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------


--MD-API-------------------------------------------------------------
This list is for questions and discussions regarding MDAEMON's API.
To unsubscribe from this mailing list send an email to
md-api-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!------------------------------------------------

---------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion.  MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/support/request_support.asp
---------------------------------------------------------------------



  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.