cancel
Showing results for 
Search instead for 
Did you mean: 

Hour in the created information is not the same the system

hsp
Champ in-the-making
Champ in-the-making
When I upload some content, it appears with two more hours than the hour in the system tray.
What configuration would be wrong?
29 REPLIES 29

steve
Champ in-the-making
Champ in-the-making
Hello,

One thing you could try is to modify your MySQL connection string in the file 'repository.properties' to be as follows:

Old String: db.url=jdbc:mysql:///${db.name}

New String: db.url=jdbc:mysql:///${db.name}?useTimezone=true

(If you are using Tomcat, this file is found in tomcat\webapps\alfresco\WEB-INF\classes\alfresco)

If this does, or does not solve your problem could you please let us know.
Thanks,

Steve

hsp
Champ in-the-making
Champ in-the-making
I am using postgresql. How could it be in repository.properties for that..

Old string: db.url=jdbcSmiley Tongueostgresql://localhost/alfresco

New: db.url=jdbcSmiley Tongueostgresql://localhost/alfresco?useTimezone=true

works?

hsp
Champ in-the-making
Champ in-the-making
I did the string mencioned above (for postgre), but the time still 2 hours more.

hsp
Champ in-the-making
Champ in-the-making
The time in file in the alf_data/contentstore/ folder is correct, but the time showed  in the UI for the file content  is 2 hours more.

steve
Champ in-the-making
Champ in-the-making
Hello,

That flag was for MySQL only…

What is your timezone setting for your PostgreSQL database?
You could try re-setting your time zone settings to LOCAL.

Also, according to the PostgreSQL docs the following is true:

PostgreSQL contains internal tabular information for time zone decoding, since there is no *nix standard system interface to provide access to general, cross-timezone information. The underlying OS is used to provide time zone information for output, however.

See here: http://www.postgresql.org/docs/7.4/interactive/datetime-keywords.html#DATETIME-MOD-TABLE

Steve

hsp
Champ in-the-making
Champ in-the-making
Thank you,
I saw the link. But how can I set the time zone in postgre to LOCAL?

hsp
Champ in-the-making
Champ in-the-making
I think it is a bug….related with time creation.
I created a folder named Temp, so it was with its time (2 hours ahead, but ok…), then I entered in the folder Temp and created another folder named Temp. In this case the parent folder Temp gets the same time, the two folder are with the same time creation (the last time).
I am using the version 1.2 RC1

steve
Champ in-the-making
Champ in-the-making
Hi,

I have been able to get this to happen in our test environments.
I have raised this as AR-410.

Steve

davidc
Star Contributor
Star Contributor
This has been fixed and will be available in next v1.2 release candidate (any day now) or SVN (r2327).

hsp
Champ in-the-making
Champ in-the-making
Ok, I'm glad.
I installed another version of postgresql (8.1) because of timezone is not working on my old installation (postgre 7.4).
After postgresql installed, I run the alfresco but it doesn't work.
The alf_data and database was created, but the caches.xml files was not.
It is happen some errors (I deleted the two files cache, alf_data and data_base):
2006-02-09 11:05:37,024 ERROR [org.hibernate.util.JDBCExceptionReporter] ERROR: function information_schema._pg_keypositions() does not exist

2006-02-09 11:05:37,114 ERROR [org.hibernate.tool.hbm2ddl.SchemaUpdate] could not complete schema update
org.hibernate.exception.SQLGrammarException: could not get table metadata: applied_patch

Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [ehcache.xml] cannot be resolved to URL because it does not exist
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheManager' defined in class path resource [alfresco/cache-context.xml]: Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [ehcache.xml] cannot be resolved to URL because it does not exist
java.io.FileNotFoundException: class path resource [ehcache.xml] cannot be resolved to URL because it does not exist

Can't resolve reference to bean 'ehCacheManager' while setting property 'cacheManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheManager' defined in class path resource [alfresco/cache-context.xml]: Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [ehcache.xml] cannot be resolved to URL because it does not exist
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheManager' defined in class path resource [alfresco/cache-context.xml]: Initialization of bean failed; nested exception is java.io.FileNotFoundException: class path resource [ehcache.xml] cannot be resolved to URL because it does not exist
java.io.FileNotFoundException: class path resource [ehcache.xml] cannot be resolved to URL because it does not exist.

Is there some imcompatibility between postgresql version 7xx and 8xx, related with functions?? what next? what about the caches files?