web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Batch Schedule Time Zone Problem

(0) ShareShare
ReportReport
Posted on by

We have a time zone problem.  We want to invoice sales orders as a batch process. 

Our AOS system date/time is 8 hours ahead.  

The problem is that sometimes the invoice date is posted same day (Pacific Time) and sometimes (after 4:00 pm) it is posted the next day.

It's like it's sometimes converting to Pacific Time and other times not.

Does anyone know why this happens?

Is there a hotfix?

Thanks in Advance.

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    RE: Batch Schedule Time Zone Problem

    Please give us more information.

    Ahead of what?

    What kind of posting? Which field?

  • brianmaric Profile Picture
    on at
    RE: Batch Schedule Time Zone Problem

    I tried to include a screen shot but it did not get added.

    Anyway, we are Invoicing the Sales Order using the salesformletter...no custom code.  The recurrence entry form is set to use Pacific Standard Time.   The system date on the AOS is 8 hours ahead of Pacific Standard Time.

    For example, if we schedule the batch process to run on 1/2/2018 at 4:10 pm.  (the server converts the datetime to 1/3/2018 at 12:10 am) Then the sales order is invoiced and the sales order invoice date is 1/3/2018.  And if I look in the SalesParmTable, the transdate field shows as 1/3/2018

    But on some other day, without making any changes and the batch process is scheduled to run on 1/8/2018 at 4:10 pm.  Then the sales order invoice date is 1/8/2018  And if I look in the SalesParmTable, the transdate field shows as 1/8/2018

    I suppose we could try removing the Pacific Standard Time entry format and schedule the batch process using the same time zone as the server but this is a bit of a puzzle.

    appreciate any help...

  • Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    RE: Batch Schedule Time Zone Problem

    I'm still not sure what you mean by "a form set to use Pacific Standard Time" and "the system date on the AOS". Are you talking about your user-preferred time zone and time zone settings of the Windows Server running AOS? What about company time zone?

  • brianmaric Profile Picture
    on at
    RE: Batch Schedule Time Zone Problem

    ...go into system administration and click on batch jobs and highlight any batch process and click on Recurrence.

    The first selection is a drop down with the label 'Time Zone'

    This selection is set to Pacific Time (US and Canada)

    That is what I am referring to...is that what you mean by 'Preferred Time Zone'?

    We set this time to run at every day at 4:10 pm

    If I set a break point go into the code or use a message box and look at timenow() it shows as 12:10 am.

  • Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    RE: Batch Schedule Time Zone Problem

    Thanks, that answers one part of my question. What about "the system date on the AOS" and the company time zone (on Company information form).

    In past, AX didn't have any special support for timezones, which is still true for date fields, but datetime fields do support timezones. AX stores such values internally in UTC and displays them in local time of user-preferred timezone (configured in user settings). For example, if I create a record now here in Germany (18:20), it will be stored in as 17:20 in database (and you'll see this value in most code), while users in Seattle will see the same value as 9:20. That's why I want to understand which timezones are you using and which fields it's about.

  • brianmaric Profile Picture
    on at
    RE: Batch Schedule Time Zone Problem

    ok...

    I just looked it up...

    The Preferred Time Zone is set to Pacific Time

    The Company Time Zone is set to Pacific Time

    The field concerned is the CustInvoiceJour.invoicedate

    This date seems to come from the SalesParmTable.transdate which appears to system generated when running the batch process.

  • Martin Dráb Profile Picture
    236,570 Most Valuable Professional on at
    RE: Batch Schedule Time Zone Problem

    Can you please answer what you mean by "the system date on the AOS"? Thank you.

  • brianmaric Profile Picture
    on at
    RE: Batch Schedule Time Zone Problem

    Yes, if I look at the system date time displayed in the lower corner of the server, it shows as exactly 8 hours ahead of Pacific Time.

  • Guy Terry Profile Picture
    28,911 Moderator on at
    RE: Batch Schedule Time Zone Problem

    Are you saying the server with your AOS is set to GMT, London, UTC or similar?

    I think this could be your problem. Per an explanation here, the Invoice Date field is a Date-only field. It is not Time Zone 'aware'.

    msdn.microsoft.com/.../cc518263.aspx

    It will contain whatever date the server running the AOS has at the time of the posting.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Tocauer Profile Picture

Martin Tocauer 4

#2
Community Member Profile Picture

Community Member 2

#2
Nayyar Siddiqi Profile Picture

Nayyar Siddiqi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans