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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Add a new time zone

(0) ShareShare
ReportReport
Posted on by 61

I want to ask about the time zone that you see in the code below. Turkey (GMT + 02: 00) time zone that was changed later.

Timezone enum no changing time zones in Turkey's flour. How to add this to Timezone?

static void UserInfoPrefTime(Args _args)
{
    UserInfo  UserInfo;

    ttsBegin;

      while select forupdate UserInfo
        where  UserInfo.enable == NoYes::Yes

        if(UserInfo)
            {
                UserInfo.preferredTimeZone = Timezone::GMTPLUS0300BAGHDAD; // Timezone enum no changing time zones in Turkey's flour.
                UserInfo.doUpdate();
            }

    ttsCommit;

    info("ok");
}


8231.timezone.png         4011.timezone1.png

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    Hi Mehmet Ali Akbulut!

    Try select GMTPLUS0200ISTANBUL in Timezone enum. And you don't need to check UserInfo while using while select statement.

    
    
    while select forupdate UserInfo
        where  UserInfo.enable == NoYes::Yes
    {
        UserInfo.preferredTimeZone = Timezone::GMTPLUS0200ISTANBUL;
        UserInfo.doUpdate(); 
    }
  • Mehmet Ali Akbulut Profile Picture
    61 on at

    Hi!

    I don't have a time zone. GMTPLUS0200ISTANBUL.

    I think this time zone needs to be added to the Timezone enum. But I don't know how to add :(

    8611.timezone.png

  • Suggested answer
    Rustem Galiamov Profile Picture
    8,072 on at

    You can't add new element in Timezone enum, it's a system enum.

    Try to use GMTPLUS0200ATHENS_BUCHAREST_ISTANBUL?

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    According to the product documentation there should be value GMTPLUS0200ATHENS_BUCHAREST_ISTANBUL available, at least in AX2012.

    Can you find this in your system?

    [View:https://docs.microsoft.com/en-us/previous-versions/dynamics/ax-2012/reference/hh153353(v%3Dax.60)]

  • Suggested answer
    nmaenpaa Profile Picture
    101,160 Moderator on at

    Ok, now I get it. Turkey changed its time zone in 2016. Apparently this time zone is not included / updated in AX2009.

    If this time zone is the same as any of the existing time zones, I would simply try to customize the UI so that it shows the desired time zone name.

    Since this is a system enum, you can't add values or change labels. One solution would be to replace the lookup with a custom lookup where you change the label of the time zone to match your requirement.

    Here is some discussion that might help you implement it: community.dynamics.com/.../252383

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans