Welcome to the SRP Forum! Please refer to the SRP Forum FAQ post if you have any questions regarding how the forum works.

E-mail Sent time not matching server

I have been having an issue with version 2.0.2.0 of the SRP e-mailing utility. When we send an e-mail from our server (AST timezone) at 12:00pm noon, when we receive it; the received time is still noon, but the sent time says 8:00am. We had an older version of the utility (1.2.0.0) and the same e-mailing code does not have this issue.

Was there a change we missed between those versions where some sort of time setup is required on send to set the timezone properly?

Comments

  • I'm not sure why this is happening. I'm getting the time from the localtime API. According to MSDN:
    localtime attempts to use the time zone information specified in the Date/Time application in Control Panel. If this information cannot be obtained, PST8PDT, which signifies the Pacific Time Zone, is used by default.
    Based on this, and given that PST is 4 hours earlier than AST, I get the impression that the SRPMail.dll is not able to retrieve the time zone from the server. Perhaps a permission setting is getting in the way?
  • I wonder. In both these cases I am connecting to the computer being run through citrix, which adjusts the time zone appropriately for the user logging in (to match their time zone). Could this have some effect on the api being called? I can't see it being involved.

    Was the 1.2.0.0 not using that localtime API previously and that is why the older version seems to work vs the new one?
  • 1.2.0.0 send mail using the now deprecated CDO Messaging service. As of 2.0, we use SMTP directly. It's reasonable that CDO has some additional logic to handle Citrix-type scenarios.

    I could add a field to SRP_Send_Mail to let you supply your own sent-date, but I don't know if OI would have the same problem. That is, I don't know what API OI is ultimately relying on for its date and time.
  • It could be related to the 'Allow time zone redirection' setting on the server. If this is/isn't set it can impact the time returned to an application. See https://technet.microsoft.com/en-us/library/cc725887(v=ws.10).aspx
Sign In or Register to comment.