28 February 2017

how to get different time zones time in AX 2012

static void timeZoneJob(Args _args)
{
    utcDateTime time1,time2;

    time1 = 2017-02-28T11:10:00;

    time2 = dateTimeUtil::applyTimeZoneOffset(time1,TimeZone::GMTPLUS0400YEREVAN); // manul time zone assign
    time2 = dateTimeUtil::applyTimeZoneOffset(time1,DateTimeUtil::getUserPreferredTimeZone()); // user based time zone assign  

    info(strFmt("%1",time2));

// AX 7

// DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone())
}

1 comment:

  1. I am not sure the place you are getting your information, however good topic. I needs to spend some time studying more or understanding more. Thank you for wonderful information I was in search of this info for my mission.
    Financial Planner Melbourne
    Financial Planning Melbourne
    Financial Planners Melbourne

    ReplyDelete

Give me the commetns and solutions

Ledger Voucher creation Framework and x++ code to create ledger voucher

 Please click her for MS reference file Below is the out of the box example reference and code. SalesInvoiceJournalPostSubBill_Extension-...