Setting default value to a time attribute

jmeabe
jmeabe Member
edited February 15, 2013 in Documentum #1

Hello, I need to set a defualt value for a time attribute. I use the following dql:

ALTER TYPE lae_informe_60000012 MODIFY (lae_atr_fechalistado(SET default= date('05-12-2011'),SET read_only=true,SET not_null=true)) publish

But then, I check the value and is the following one:

lae_atr_fechalistado13/04/2011 1:00:00

As you can see the month has been increased, and the day decreased...Why does this happen?? How can I set correctly the default value?

Many thanks!!

Tagged:

Best Answer

  • jmeabe
    jmeabe Member
    edited February 15, 2013 #2 Answer ✓

    In the end the problem was the time zone configuration in my server. It was set to UTC time, while were I live the tz is UTC +1:00, so the system automatically subtracted one hour to every time attribute set. I solved it by setting the value of r_normal_tz attribute in dm_docbase_config object to 3600 (number of seconds of an hour to add to UTC time).

    Regards.

Answers

  • DCTM_Guru
    DCTM_Guru Member
    edited February 1, 2013 #3

    How/where are you seeing this value?  You are probably seeing effect of timezone offset.

  • jmeabe
    jmeabe Member
    edited February 1, 2013 #4

    I'm trying to set it through DQL editor first, and when I get the proper dql I will do it inside a webservice code with a query execution object using the same dql.

  • DCTM_Guru
    DCTM_Guru Member
    edited February 1, 2013 #5

    Are you using DQL editor within DA or repoint or DQL command line tool on Content Server.  I would also be more exact in your query:

    ALTER TYPE lae_informe_60000012 MODIFY (lae_atr_fechalistado(SET default= date('05-12-2011 00:00:00'),SET read_only=true,SET not_null=true)) publish

  • jmeabe
    jmeabe Member
    edited February 15, 2013 #6 Answer ✓

    In the end the problem was the time zone configuration in my server. It was set to UTC time, while were I live the tz is UTC +1:00, so the system automatically subtracted one hour to every time attribute set. I solved it by setting the value of r_normal_tz attribute in dm_docbase_config object to 3600 (number of seconds of an hour to add to UTC time).

    Regards.