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

DB restore production DB to DEV environment in D365 FO using Bacpac file

  https://www.linkedin.com/pulse/restore-production-database-dev-environment-d365fo-using-abbas-tfwbe SQLPackage link : https://www.linkedin...