Bug #4609
Documents: bad update time label
Description
En la herramienta documentos, si se crea un archivo entre las doce de la noche y la una de la mañana del día (es decir la primera hora del día) le asigna un horario como si hubiera sido creada el día anterior.
Files
Associated revisions
undo change see #4609
Should fix time label bug when creating a document see #4609
History
Updated by Yoselyn Castillo over 8 years ago
- Status changed from New to Assigned
- Assignee set to Yoselyn Castillo
Updated by Yoselyn Castillo over 8 years ago
- Status changed from Assigned to Needs testing
- % Done changed from 0 to 60
I have to test the changes at the time specified in the description
Updated by Yoselyn Castillo over 8 years ago
- File edit_document.php edit_document.php added
- File main_api.lib.php main_api.lib.php added
- Assignee changed from Yoselyn Castillo to Julio Montoya
- % Done changed from 60 to 80
Upload these files. Fixed
Updated by Julio Montoya over 8 years ago
- Assignee changed from Julio Montoya to Yoselyn Castillo
Hello Yoselyn,
We don't use anymore the mysql function NOW check the coding conventions we use the api_get_utc_datetime()
http://support.chamilo.org/projects/chamilo-18/wiki/Coding_conventions
Updated by Yoselyn Castillo over 8 years ago
- Assignee changed from Yoselyn Castillo to Julio Montoya
Upload just the edit_document.php file for doing a test.
Updated by Julio Montoya over 8 years ago
- Assignee changed from Julio Montoya to Yoselyn Castillo
Yoselyn Castillo wrote:
Upload just the edit_document.php file for doing a test.
you forgot to add the file?
Updated by Yoselyn Castillo over 8 years ago
- Assignee changed from Yoselyn Castillo to Julio Montoya
Es el que habia adjuntado antes edit_document.php
Updated by Julio Montoya over 8 years ago
- Assignee changed from Julio Montoya to Yoselyn Castillo
Acabo de enviar el archivo edit_document.php, el otro archivo main.api no ha sido subido por lo que comentaba que no usamos la función NOW de mysql
Updated by Yoselyn Castillo over 8 years ago
- File edit_document.php edit_document.php added
- Status changed from Needs testing to Assigned
- Assignee changed from Yoselyn Castillo to Julio Montoya
Sube el file edit_document.php este para restablecer el cambio anterior
Updated by Julio Montoya over 8 years ago
- Status changed from Assigned to Needs more info
- Assignee changed from Julio Montoya to Yoselyn Castillo
archivo enviado.
Updated by Yannick Warnier over 8 years ago
- Subject changed from bad label time - documents tool to Documents: bad update time label
- Assignee deleted (
Yoselyn Castillo)
Updating title and unassigning from Yoselyn as we need tests from someone else.
Maybe Coursenligne or Juan Carlos can help us close it?
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs more info to Needs testing
- Assignee set to Juan Carlos Raña Trabado
Updated by Juan Carlos Raña Trabado over 8 years ago
Sinceramente sigo viendo que se produce el mismo error. Cuando se crea un documento entre las 00:00 y las 01:00 le pone fecha de ayer, cuando en realidad tendría que poner fecha de hoy, pues se trata de la primera hora del día.
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs testing to Assigned
- Assignee changed from Juan Carlos Raña Trabado to Julio Montoya
- Priority changed from Normal to Urgent
- % Done changed from 80 to 50
Juan Carlos Raña wrote:
Sinceramente sigo viendo que se produce el mismo error. Cuando se crea un documento entre las 00:00 y las 01:00 le pone fecha de ayer, cuando en realidad tendría que poner fecha de hoy, pues se trata de la primera hora del día.
A mi me reportan que esto ocurre también (al revés para Perú, pues estamos a GMT-5 y tu a GMT+2) para calendario y asistencias. Esto llega a ser prioritario ahora para 1.9.
En resumen (si no me equivoco) para reproducir:
- poner el portal en una zona horaria (cualquiera que no sea UTC)
- grabar un documento, evento o asistencia en una hora cerca de medianoche (si el portal está en GMT+x como Bruselas, entonces poner a la 1am, si está en GMT-x como Lima, poner a las 11pm)
- revisar la interfaz que indica el día
En el calendario, esto ocurre solo para un tipo de eventos (no me acuerdo cual, los personales o los de cursos). *
Updated by Julio Montoya over 8 years ago
- File agenda.png agenda.png added
He probado lo que menciona Yannick:
En mi php.ini tengo: date.timezone = "Europe/Paris"
En chamilo tengo America/Lima
Creé 2 eventos uno personal y otro dentro de un curso con esta fecha:
Mar 31 Jul 2012 23:00:00 - 23:30:00
Se ve correctamente en ambos casos.
ver imagen:
Voy a probar con los documentos
Updated by Julio Montoya over 8 years ago
Acabo de encontrar unos problemillas con el uso de esta funciǿn:
$last_edit_date = api_get_local_time($last_edit_date, null, date_default_timezone_get());
se debería de usar simplement:
$last_edit_date = api_get_local_time($last_edit_date);
He hecho unas pruebas cambiando la hora de mi PC y parece funcionar.
Updated by Julio Montoya over 8 years ago
- Status changed from Assigned to Needs testing
- Assignee deleted (
Julio Montoya)
En las asistencias tambien parece funcionar bien he creado eventos desde hoy 31 de julio a las 1130pm hasta el 7 de agosto y todo parece bien ...
Updated by Yannick Warnier over 8 years ago
Hola Julio, en los documentos también lo revisaste, verdad?
Updated by Yannick Warnier over 8 years ago
- time is stored as UTC time: OK
- I change the time stored in the database to 00:43:00 UTC time, it still displays "today": OK
- I change the time stored in the database to yesterday at 23:43:00 UTC time, it still displyas "today": OK (Brussels is 2 hours ahead so it is equivalent to 01:43:00, so today indeed)
- I change the time stored in the database to yesterday at 21:43:00 UTC time, it displays as "yesterday": OK
I'm currently stuck in my testing because I cannot change my personal timezone, which "seems" (not sure yet) to be related to this commit http://code.google.com/p/chamilo/source/detail?repo=classic&r=0b5d08b71664163570452a19869e8b2dc436270e&spec=svn.classic.0b5d08b71664163570452a19869e8b2dc436270e#
Updated by Yannick Warnier over 8 years ago
Changing personal timezone gives the right results as well. The only remaining bit is testing the agenda...
Updated by Yannick Warnier over 8 years ago
- Status changed from Needs testing to Bug resolved
OK, good for me! I tested the agenda both from course and globally, with 2 different timezones, both in personal and platform context, and it matches what should be expected each time. Closing.
Documents: bad label time see #4609