Why LDAP inetOrgPerson class has preferredLanguage attribute but no timezone attribute?

StackOverflow https://stackoverflow.com/questions/21193873

  •  29-09-2022
  •  | 
  •  

Question

I'm using OpenDJ and I was surprised to discover that inetOrgPerson object class contains no built-in attribute to specify the preferred timezone, only preferred language. Any ideas why such basic field as timezone is missing and how to add it? May be there is another auxiliary object class that can contain this information? I scanned the whole OpenDJ installation but didn't find something that could fit, except some Solaris classes. I'd like to save the complexities of extending the schema, so as a simplified solution I consider reusing one of the unused inetOrgPerson attributes for storing timezone information. Do you think it is a good idea?

Was it helpful?

Solution

As you have discovered yourself, there is no standard attribute to store a timezone associated with a user. This is not an OpenDJ only issue, it's an LDAP-wide standard issue. The only one that I know of is attached to NIS+ schema and I'm not even sure it's defined as being generic enough. The proper way to do this would be to define a new attribute and an auxiliary objectclass to contain that attribute. With OpenDJ, you could also define an "ENUM" syntax to restrict the values to proper timezones.

You could for your own application decide to "abuse" another attribute to store the timezone. But this may create confusion to other applications that will connect to the server in the future. I would not recommend it.

Kind regards, Ludovic

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top